<template>
  <div class="qjzl">
    <timePicker @timeChange="timeChangeFn" />
    <div class="qjzlleft">
      <div class="xzxk-box">
        <div
          class="lm-top"
          :style="`background:url(${bgImg[0]});background-size: 100% 100%;`"
        ></div>
        <div class="main">
          <div class="main1">
            <div
              class="main1-item"
              v-for="(item, index) in xzxkcount"
              :key="index"
            >
              <div v-if="item.name == '生产企业(个)'">
                <div class="capacity-box hoverpointer">
                  <div v-show="ProductionDetail" class="ProductionDetailClass">
                    <div class="capacity-box">
                      <div class="head">
                        <div class="head-item">生产企业</div>
                        <div class="head-item" style="width: 50%">
                          计划生产量(万盒)
                        </div>
                        <div class="head-item">实际生产量</div>
                      </div>
                      <div
                        class="body"
                        v-for="(item, index) in xssjdata"
                        :key="index"
                      >
                        <div class="body-item">{{ item.name }}</div>
                        <div class="body-item">{{ item.num }}</div>
                        <div class="body-item">{{ item.sjnum }}</div>
                      </div>
                    </div>
                  </div>
                  <div class="title">
                    <span class="fw-600">{{ item.name }}</span>
                  </div>
                  <div class="num">
                    <span
                      class="fs-24 fw-600 main-color"
                      @mouseenter="ProductionDetail = true"
                      @mouseleave="ProductionDetail = false"
                    >
                      <count-to
                        v-if="item.num"
                        :startVal="0"
                        :endVal="Number(item.num)"
                        :duration="3000"
                      ></count-to>
                      <span v-else>0</span>
                    </span>
                    <!-- <span>&nbsp;({{ item.unit }})</span> -->
                  </div>
                </div>
              </div>
              <div v-else-if="item.name == '持证户数(户)'">
                <div class="capacity-box hoverpointer">
                  <div v-show="CertifiedAccountDetail" class="CertifiedAccountDetailClass">
                    <div class="capacity-box">
                      <div
                        id="CertifiedAccountBar"
                        key="CertifiedAccountBar"
                        style="width: 300px; height: 180px"
                      ></div>
                    </div>
                  </div>
                  <div class="title">
                    <span class="fw-600">{{ item.name }}</span>
                  </div>
                  <div class="num">
                    <span
                      class="fs-24 fw-600 main-color"
                      @mouseenter="showCertifiedAccountDetail"
                      @mouseleave="CertifiedAccountDetail = false"
                    >
                      <count-to
                        v-if="item.num"
                        :startVal="0"
                        :endVal="Number(item.num)"
                        :duration="3000"
                      ></count-to>
                      <span v-else>0</span>
                    </span>
                    <!-- <span>&nbsp;({{ item.unit }})</span> -->
                  </div>
                </div>
              </div>
              <div v-else>
                <div class="title">
                  <span class="fw-600">{{ item.name }}</span>
                </div>
                <div class="num">
                  <span class="fs-24 fw-600 main-color">
                    <count-to
                      v-if="item.num"
                      :startVal="0"
                      :endVal="Number(item.num)"
                      :duration="3000"
                    ></count-to>
                    <span v-else>0</span>
                  </span>
                  <!-- <span>&nbsp;({{ item.unit }})</span> -->
                </div>
              </div>
            </div>
          </div>
          <div class="main2">
            <div class="main2-title"></div>
            <div class="content">
              <div
                class="main2-item"
                v-for="(item, index) in jsps"
                :key="index"
              >
                <div class="num">
                  <span class="fs-24 fw-600 main-color">
                    <count-to
                      v-if="item.num"
                      :startVal="0"
                      :endVal="Number(item.num)"
                      :duration="3000"
                    ></count-to>
                    <span v-else>0</span>
                  </span>
                </div>
                <div class="title">
                  <span class="fw-600">{{ item.name }}</span>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <template v-if="!showCityData">
        <!-- 行政许可结束 -->
        <div class="jygl-box">
          <div
            class="lm-top"
            :style="`background:url(${bgImg[1]});background-size: 100% 100%;`"
          ></div>
          <div class="main">
            <div
              class="fw-600 fs-16"
              style="text-align: center; margin-bottom: 10px"
            >
              平均在销品牌数量(个)
            </div>
            <div class="main1">
              <div
                class="main1-item"
                v-for="(item, index) in [jygla[0], jygla[1]]"
                :key="index"
              >
                <div class="num">
                  <div>
                    <span
                      class="fw-600"
                      style="display: inline-block; width: 60px"
                      >{{ item.name }}</span
                    >
                    <span class="fs-28 fw-600 main-color">
                      <count-to
                        v-if="item.num"
                        :startVal="0"
                        :endVal="Number(item.num)"
                        :duration="3000"
                      ></count-to>
                      <span v-else>0</span>
                    </span>
                  </div>
                  <!-- <span>&nbsp;(个)</span> -->
                  <!--    <span v-if="item.range"
                    >&nbsp;&nbsp;
                    <span class="fw-600">全国排名</span>
                    <span class="main-color"
                      ><count-to
                        :startVal="0"
                        :endVal="Number(item.range)"
                        :duration="3000"
                      ></count-to
                    ></span>
                    <span>名</span>
                  </span> -->
                </div>
              </div>
            </div>
            <div
              class="fw-600 fs-16"
              style="text-align: center; margin: 10px 0px"
            >
              <span>
                <img
                  style="width: 10px; height: 10px"
                  src="../../assets/common-new/nation-icon.png"
                  alt=""
                />
              </span>
              平均在销规格数量(个)
            </div>
            <div class="main1">
              <div
                class="main1-item"
                v-for="(item, index) in [jygla[2], jygla[3]]"
                :key="index"
              >
              <div class="num" v-if="index == 1">
                  <div class="capacity-box hoverpointer">
                    <div v-show="SpecificationQuantityDetail" class="CertifiedAccountDetailClass">
                      <div class="capacity-box">
                        <div
                        id="SpecificationQuantityBar"
                        key="SpecificationQuantityBar"
                        style="width: 300px; height: 180px"
                      ></div>
                      </div>
                    </div>
                    <div>
                      <span
                        class="fw-600"
                        style="display: inline-block; width: 60px"
                        >{{ item.name }}</span
                      >
                      <span
                        class="fs-28 fw-600 main-color"
                        @mouseenter="SpecificationQuantityDetail = true"
                        @mouseleave="SpecificationQuantityDetail = false"
                        ><count-to
                          :startVal="0"
                          :endVal="Number(item.num) || 0"
                          :duration="3000"
                          :decimals="0"
                        ></count-to
                      ></span>
                    </div>
                  </div>
                </div>
                <div class="num" v-else>
                  <span
                    class="fw-600"
                    style="display: inline-block; width: 60px"
                    >{{ item.name }}</span
                  >
                  <span class="fs-28 fw-600 main-color">
                    <count-to
                      v-if="item.num"
                      :startVal="0"
                      :endVal="Number(item.num)"
                      :duration="3000"
                    ></count-to>
                    <span v-else>0</span>
                  </span>
                  <!-- <span>&nbsp;(个)</span> -->
                  <!--    <span v-if="item.range"
                    >&nbsp;&nbsp;
                    <span class="fw-600">全国排名</span>
                    <span class="main-color"
                      ><count-to
                        :startVal="0"
                        :endVal="Number(item.range)"
                        :duration="3000"
                      ></count-to
                    ></span>
                    <span>名</span>
                  </span> -->
                </div>
              </div>
            </div>
          </div>
        </div>
        <!-- 交易管理结束 -->
        <div class="xsqk-box">
          <div
            class="lm-top"
            :style="`background:url(${bgImg[2]});background-size: 100% 100%;`"
          ></div>
          <div class="main">
            <!-- <div class="main1">
              <div class="title">
                <div class="fw-600">生产企业</div>
                <div class="fw-600">计划生产量（万盒）</div>
                <div class="fw-600">实际生产量</div>
              </div>
              <div class="num">
                <vue-seamless-scroll
                  class="dzyglfbotdivc"
                  :data="xssjdata"
                  :class-option="scrollOptiona"
                  style="overflow-y: hidden"
                >
                  <ul class="dzyglfbotdivc" style="height: auto">
                    <li v-for="(item, index) in xssjdata" :key="index">
                      <div
                        class="width100per dflex justifybetween fontsize14 whitecolor"
                      >
                        <div class="partflex marginleft20px">
                          {{ item.name }}
                        </div>
                        <div class="partflex txtcenter">{{ item.num }}</div>
                        <div class="partflex txtright marginright20px">
                          {{ item.sjnum }}
                        </div>
                      </div>
                    </li>
                  </ul>
                </vue-seamless-scroll>
              </div>
            </div> -->
            <div
              class="fw-600 fs-16"
              style="text-align: center; margin-bottom: 10px"
            >
              销售总量(万个)
            </div>
            <div class="main2">
              <div
                class="main1-item"
                v-for="(item, index) in [xsqka[0], xsqka[1]]"
                :key="index"
              >
                <div class="num" v-if="index == 1">
                  <div class="capacity-box hoverpointer">
                    <div v-show="saleTotal" class="saleTotalClass">
                      <div class="capacity-box">
                        <div
                          class="body"
                          v-for="(item, index) in ljmlbot"
                          :key="index"
                        >
                          <div class="body-item">{{ item.name }}</div>
                          <div class="body-item">{{ item.num || 0 }}</div>
                        </div>
                      </div>
                    </div>
                    <div>
                      <span
                        class="fw-600"
                        style="display: inline-block; width: 60px"
                        >{{ item.name }}</span
                      >
                      <span
                        class="fs-28 fw-600 main-color"
                        @mouseenter="saleTotal = true"
                        @mouseleave="saleTotal = false"
                        ><count-to
                          :startVal="0"
                          :endVal="Number(item.num) || 0"
                          :duration="3000"
                          :decimals="2"
                        ></count-to
                      ></span>
                    </div>
                  </div>
                </div>
                <div class="num" v-else>
                  <span
                    class="fw-600"
                    style="display: inline-block; width: 60px"
                    >{{ item.name }}</span
                  >
                  <span class="fs-28 fw-600 main-color"
                    ><count-to
                      :startVal="0"
                      :endVal="Number(item.num) || 0"
                      :duration="3000"
                      :decimals="2"
                    ></count-to
                  ></span>
                  <!-- <span>&nbsp;({{ item.unit }})</span> -->
                  <!-- <span v-if="item.range"
                    >&nbsp;&nbsp;
                    <span class="fw-600">全国排名</span>
                    <span class="main-color">
                      <count-to
                        :startVal="0"
                        :endVal="Number(item.range)"
                        :duration="3000"
                      >
                      </count-to>
                    </span>
                    <span>名</span>
                  </span> -->
                </div>
              </div>
            </div>
            <div
              class="fw-600 fs-16"
              style="text-align: center; margin: 10px 0px"
            >
              <span>
                <img
                  style="width: 10px; height: 10px"
                  src="../../assets/common-new/nation-icon.png"
                  alt=""
                />
              </span>
              销售额(万元)
            </div>
            <div class="main2">
              <div
                class="main1-item"
                v-for="(item, index) in [xsqka[2], xsqka[3]]"
                :key="index"
              >
                <div class="num">
                  <span
                    class="fw-600"
                    style="display: inline-block; width: 60px"
                    >{{ item.name }}</span
                  >
                  <span class="fs-28 fw-600 main-color"
                    ><count-to
                      :startVal="0"
                      :endVal="Number(item.num) || 0"
                      :duration="3000"
                      :decimals="2"
                    ></count-to
                  ></span>
                  <!-- <span>&nbsp;({{ item.unit }})</span> -->
                  <!-- <span v-if="item.range"
                    >&nbsp;&nbsp;
                    <span class="fw-600">全国排名</span>
                    <span class="main-color">
                      <count-to
                        :startVal="0"
                        :endVal="Number(item.range)"
                        :duration="3000"
                      >
                      </count-to>
                    </span>
                    <span>名</span>
                  </span> -->
                </div>
              </div>
            </div>
            <div class="main3">
              <div
                class="main3-item"
                v-for="(item, index) in ljml"
                :key="index"
              >
                <span class="title fs-14 fw-600">{{ item.name }}</span>
                <div class="num">
                  <span class="fs-22 fw-600 main-color">
                    <count-to
                      :startVal="0"
                      :endVal="Number(item.num) || 0"
                      :duration="3000"
                      :decimals="2"
                    >
                    </count-to>
                  </span>
                  <!-- <span>&nbsp;{{item.unit}}</span> -->
                </div>
              </div>
            </div>
            <!-- <div class="main4">
              <div
                class="main4-item"
                v-for="(item, index) in ljmlbot"
                :key="index"
              >
                <div class="num">
                  <span class="fs-20 fw-600 main-color"
                    ><count-to
                      :startVal="0"
                      :endVal="Number(item.num)"
                      :duration="3000"
                    ></count-to
                  ></span>
                  <span class="fs-14">&nbsp;{{ item.unit }}</span>
                </div>
                <div class="title">
                  <span class="fw-600 fs-14">{{ item.name }}</span>
                </div>
              </div>
            </div> -->
          </div>
        </div>
        <!-- 销售概况结束 -->
      </template>
      <template v-else>
        <city-sale-data :orgUuid="orgUuid"></city-sale-data>
      </template>
    </div>
    <div class="qjzlcenter positiondiv">
      <div class="dflex width100per justifybetween">
        <div class="maptableft" style="width: 100%">
          <!-- <div
            class="map-title"
            v-on:click="mapBack()"
            :style="`background:url(${bgImg[7]});width:100%;height:40px;background-size: 100% 100% !important;`"
          ></div> -->
          <div class="map-title">
            <span
              style="margin-left: 10px"
              v-for="(item, index) in clickArea"
              :key="item"
            >
              <!-- <img src="../../assets/common-new/back.png" alt="" /> -->
              <div class="prov" @click="mapBack(index)">
                {{ item }} <span v-if="index != clickArea.length - 1"> / </span>
              </div>
            </span>
          </div>
        </div>
        <div class="maptabright" style="flex: 1">
          <div class="dflex" style="width: 100%; position: relative">
            <div
              class="fontsize14 dflex"
              style="
                position: absolute;
                right: 0;
                top: 0;
                align-items: center;
                justify-content: flex-end;
              "
            >
              <!-- <div class="timebg">
                {{ nowTime }}
              </div> -->
            </div>
          </div>
        </div>
      </div>
      <!-- 这里是市场秩序评价中间地图部分开始 -->
      <custom-list 
        v-if="RightListItems.length!=0&&titleMap.level==1"
        position="right" 
        :title="RightListTitle" 
        :columns="RightListColumns" 
        :items="RightListItems"
       />
      <div class="width100per cenmap divclear">
        <div class="width100per height100per dflex justifybetween">
          <div class="partflex height100per positiondiv">
            <div class="width100per mapheightqjzl">
              <!-- <div id="myEchart" ref="myEchart" class="width100per mapheightqjzl" /> -->
              <!-- <div v-if="isHideShow" style="height: 550px"></div> -->

              <anhuiMap
                :idName="'crackDownMap'"
                ref="crackDownMap"
                :heightSet="'550px'"
                :mapTop="'50px'"
                :zoom="1.2"
                :layoutCenter="['50%', '49%']"
                :formatterCustom="formatterCustom"
                :data="mapData"
              ></anhuiMap>
            </div>
          </div>
        </div>
      </div>
      <custom-list 
        v-if="LeftListItems.length!=0&&titleMap.level==1"
        position="left" 
        :title="LeftListTitle" 
        :columns="LeftListColumns" 
        :items="LeftListItems" 
      />
      <!-- 这里是市场秩序评价中间地图部分结束 -->

      <div class="width100per divclear">
        <div
          class="lm-top"
          :style="`background:url(${bgImg[6]});background-size: 100% 100% !important;margin-top:15px`"
        ></div>
      </div>
      <div class="width100per centerbotdiv positiondiv">
        <div id="fjps-box" style="width: 100%; height: 165px"></div>
        <!-- <div class="width100per height170px" id="fjps"></div>
        <div class="centerbotdivposition">
          <ul>
            <li v-for="(item, index) in centerlistbot" :key="index">
              <span class="color-cube"></span>
              <span class="fs-14"> {{ item.name }}</span>
            </li>
          </ul>
        </div> -->
      </div>
    </div>
    <div class="qjzlright">
      <div
        class="lm-top"
        :style="`background:url(${bgImg[3]});background-size: 100% 100%;`"
      ></div>
      <div class="width100per divclear">
        <div class="width100per ">
          <div class="width100per dzygrightyopahei" id="khyl"></div>
        </div>
      </div>
      <!-- 客户盈利布局完毕 -->
      <div class="dflex width100per justifybetween margintop10">
        <div
          class="lm-top"
          :style="`background:url(${bgImg[4]});background-size: 100% 100%;`"
        ></div>
      </div>
      <div class="width100per divclear">
        <div class="dzygrightyop">
          <div class="main1" style="">
            <div
              class="main1-item"
              v-for="(item, index) in [djjga[0]]"
              :key="index"
              style="width: 100%"
            >
              <div style="line-height: 40px">
                <img
                  v-if="!index"
                  style="width: 10px; height: 10px; margin-right: 5px"
                  src="../../assets/common-new/nation-icon.png"
                  alt=""
                />
              </div>
              <span class="fw-600" style="margin-right: 20px"
                >{{ item.name }}(起)</span
              >
              <span>
                <span class="fs-24 fw-600 main-color">
                  <count-to
                    v-if="item.num"
                    :startVal="0"
                    :endVal="Number(item.num)"
                    :duration="3000"
                  ></count-to>
                  <span v-else>0</span>
                </span>
                <!-- <span class="fs-14">{{ item.unit }}</span> -->
              </span>
            </div>
          </div>
          <div>
            <div class="width100per dflex justifycont alignitem">
              <div class="justifycont alignitem aligncon partflex">
                <div class="width100per">
                  <div class="width100per height120px" id="Nightingalea"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="main1">
            <div
              class="main1-item"
              v-for="(item, index) in [djjga[1]]"
              :key="index"
              style="width: 100%"
            >
              <span class="fw-600" style="margin-right: 20px"
                >{{ item.name }}(起)</span
              >
              <span>
                <span class="fs-24 fw-600 main-color">
                  <count-to
                    v-if="item.num"
                    :startVal="0"
                    :endVal="Number(item.num)"
                    :duration="3000"
                  ></count-to>
                  <span v-else>0</span>
                </span>
                <!-- <span class="fs-14">{{ item.unit }}</span> -->
              </span>
            </div>
          </div>
          <div>
            <div class="width100per dflex justifycont alignitem">
              <div class="justifycont alignitem aligncon partflex">
                <div class="width100per">
                  <div class="width100per height120px" id="Nightingaleb"></div>
                </div>
              </div>
            </div>
          </div>
          <div class="width100per alignitem margintop18"></div>

          <div class="main2">
            <div class="main2-title"></div>
            <div class="content">
              <div
                class="content-item"
                v-for="(item, index) in wpcount"
                :key="index"
              >
                <div class="title fs-14 fw-600">{{ item.name }}</div>
                <div class="num">
                  <div
                    class="text"
                    :style="`background:url(${bgImg[5]});background-size: 100% 100%;`"
                  >
                    <span class="fs-24 main-color fw-600 ml-30">
                      <count-to
                        v-if="item.num"
                        :startVal="0"
                        :endVal="Number(item.num)"
                        :duration="3000"
                        :decimals="2"
                      ></count-to>
                      <span v-else>0</span>
                    </span>
                    <!-- <span class="fs-14">&nbsp;{{ item.unit }}</span> -->
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!-- <div class="width100per height100px">
            <div class="width100per height120px" id="barbot"></div>
          </div> -->
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import * as allData from "./fakeData";
import Anhui from "../../mapdata/anhui/anhui.json";
import axios from "axios";
// import China from "../../mapdata/china/china.json";
import "../../mapdata/china/china.js";
import "../../utils/echarts-tooltip-auto";
import anhuiMap from "@/components/echart/anhuiMap";
import citySaleData from "@/views/dzyg/citySaleData";
import {
  getECigarHoldLicNum,
  getECigarCaseNum,
  getMapData,
  getElectronicCigTradeMgt,
  getElectronicCigSaleStat,
  getElectronicCigCustProft,
  getECigarAmtData,
  getEnterpriseGrossProfit,
  getEnterpriseOrderRatioRanking,
  getEnterpriseSellNumberRanking,
  getEcigarBmkData
} from "@/api/ecigar.js";
import { getQtyTotal } from "@/api/case.js";
import { formatMaxNum, formatMinNum } from "@/utils/index.js";
import { getPrevMonth } from '@/utils/index.js'
import timePicker from "@/components/timePicker/index.vue";
import CustomList from "@/components/mapList/mapList.vue";

export default {
  data() {
    return {
      NightingaleaTot: 0,
      NightingalebTot: 0,
      saleTotal: false,
      ProductionDetail: false,
      CertifiedAccountDetail:false,
      SpecificationQuantityDetail:false,
      xsqsEchartsData: [],
      showCityData: false,
      orgUuid: "",

      //客户盈利
      custProft: {},
      //地图区域
      clickArea: ["安徽省"],
      titleMap: {
        name: "安徽省",
        uuid: "00000000000000000000000011340001",
        level: 1,
        oldName: "安徽省",
      },
      columnName:"prov_org_uuid",
      dataMaps: {
        安徽省: 340000,
        合肥市: 340100,
        瑶海区: 340102,
        庐阳区: 340103,
        蜀山区: 340104,
        包河区: 340111,
        长丰县: 340121,
        肥东县: 340122,
        肥西县: 340123,
        庐江县: 340124,
        巢湖市: 340181,
        芜湖市: 340200,
        镜湖区: 340202,
        鸠江区: 340207,
        弋江区: 340209,
        湾沚区: 340210,
        繁昌区: 340211,
        南陵县: 340223,
        无为市: 340281,
        蚌埠市: 340300,
        龙子湖区: 340302,
        蚌山区: 340303,
        禹会区: 340304,
        淮上区: 340311,
        怀远县: 340321,
        五河县: 340322,
        固镇县: 340323,
        淮南市: 340400,
        大通区: 340402,
        田家庵区: 340403,
        谢家集区: 340404,
        八公山区: 340405,
        潘集区: 340406,
        凤台县: 340421,
        寿县: 340422,
        马鞍山市: 340500,
        花山区: 340503,
        雨山区: 340504,
        博望区: 340506,
        当涂县: 340521,
        含山县: 340522,
        和县: 340523,
        淮北市: 340600,
        杜集区: 340602,
        相山区: 340603,
        烈山区: 340604,
        濉溪县: 340621,
        铜陵市: 340700,
        铜官区: 340705,
        义安区: 340706,
        郊区: 340711,
        枞阳县: 340722,
        安庆市: 340800,
        迎江区: 340802,
        大观区: 340803,
        宜秀区: 340811,
        怀宁县: 340822,
        太湖县: 340825,
        宿松县: 340826,
        望江县: 340827,
        岳西县: 340828,
        桐城市: 340881,
        潜山市: 340882,
        黄山市: 341000,
        屯溪区: 341002,
        黄山区: 341003,
        徽州区: 341004,
        歙县: 341021,
        休宁县: 341022,
        黟县: 341023,
        祁门县: 341024,
        滁州市: 341100,
        琅琊区: 341102,
        南谯区: 341103,
        来安县: 341122,
        全椒县: 341124,
        定远县: 341125,
        凤阳县: 341126,
        天长市: 341181,
        明光市: 341182,
        阜阳市: 341200,
        颍州区: 341202,
        颍东区: 341203,
        颍泉区: 341204,
        临泉县: 341221,
        太和县: 341222,
        阜南县: 341225,
        颍上县: 341226,
        界首市: 341282,
        宿州市: 341300,
        埇桥区: 341302,
        砀山县: 341321,
        萧县: 341322,
        灵璧县: 341323,
        泗县: 341324,
        六安市: 341500,
        金安区: 341502,
        裕安区: 341503,
        叶集区: 341504,
        霍邱县: 341522,
        舒城县: 341523,
        金寨县: 341524,
        霍山县: 341525,
        亳州市: 341600,
        谯城区: 341602,
        涡阳县: 341621,
        蒙城县: 341622,
        利辛县: 341623,
        池州市: 341700,
        贵池区: 341702,
        东至县: 341721,
        石台县: 341722,
        青阳县: 341723,
        宣城市: 341800,
        宣州区: 341802,
        郎溪县: 341821,
        泾县: 341823,
        绩溪县: 341824,
        旌德县: 341825,
        宁国市: 341881,
        广德市: 341882,
      },
      dataMap: require("../../mapdata/anhui/anhui.json"),
      // new
      NightingaleaData: [],
      NightingalebData: [],
      bgImg: [
        require("../../assets/dzygl-new/xzxk/title.png"),
        require("../../assets/dzygl-new/ppgl/title.png"),
        require("../../assets/dzygl-new/jygl/title.png"),
        require("../../assets/dzygl-new/khyl/mletitle.png"),
        require("../../assets/dzygl-new/djjg/title3.png"),
        require("../../assets/dzygl-new/djjg/num-bg2.png"),
        require("../../assets/dzygl-new/fjps/title.png"),
        require("../../assets/djds-new/map-title.png"),
      ],
      // old
      nowDate: null,
      nowTime: null,
      timer: "",
      currentTime: new Date(),
      isHideShow: false,
      mapData: allData.mapData,
      imgUrl: require("../../assets/qjzl/dialogbg.png"),
      mapindex: 1,
      time: "",
      defaultDate: [
        "2023-01-01",
        new Date().toLocaleDateString().replace(/\//g, "-"),
      ],
      xzxkcount: [
        {
          code: "planningCapacity",
          name: "规划零售户数(户)",
          num: 1877,
          unit: "户",
        },
        {
          code: "holdLicenseNum",
          name: "持证户数(户)",
          num: 0,
          unit: "户",
        },
        {
          code: "currMonthAddNum",
          name: "本月新增户数(户)",
          num: 0,
          unit: "户",
        },
        {
          code: "currMonthExitNum",
          name: "本月退出户数(户)",
          num: 0,
          unit: "户",
        },
        {
          // code: "planningCapacity", // 待确认
          name: "生产企业(个)",
          num: 3,
          unit: "个",
        },
        {
          // code: "planningCapacity", // 待确认
          name: "批发企业(个)",
          num: 1,
          unit: "个",
        },
      ],
      jsps: [
        {
          name: "申请数量",
          num: 0,
        },
        {
          name: "通过数量",
          num: 0,
        },
      ],
      jygla: [
        {
          // name: "全国平均在销品牌数量(个)",
          name: "全国",
          num: 20,
        },
        {
          // name: "我省在销品牌数量(个)",
          name: "安徽",
          num: 21,
          range: 15,
        },
        {
          // name: "全国平均在销规格数量(个)",
          name: "全国",
          num: 92,
        },
        {
          // name: "我省在销规格数量(个)",
          name: "安徽",
          num: 72,
          range: 23,
        },
      ],
      jyglb: [
        {
          imgUrl: require("../../assets/dzyg/jya1.png"),
          name: "我省在销品牌数量",
          num: "21",
          rankname: "全国排名",
          rank: "15",
        },
        {
          imgUrl: require("../../assets/dzyg/jya2.png"),
          name: "我省在销规格数量",
          num: "21",
          rankname: "全国排名",
          rank: "15",
        },
      ],

      xssjdata: [
        {
          name: "安徽越湾 ",
          num: 270,
          sjnum: "-",
        },
        {
          name: "蚌埠奇雾 ",
          num: 8330,
          sjnum: "-",
        },
        {
          name: "集友广誉 ",
          num: 70,
          sjnum: "-",
        },
      ],
      xsqka: [
        {
          // name: "全国销售总量(万盒)",
          name: "全国",
          num: 1630,
          unit: "万盒",
        },

        {
          // name: "我省销售总量(万盒)",
          name: "安徽",
          num: 35.31,
          unit: "万盒",
          range: 18,
        },
        {
          // name: "全国销售额(万元)",
          name: "全国",
          num: 133955,
          unit: "万元",
        },
        {
          // name: "我省销售额(万元)",
          name: "安徽",
          num: 2030.8,
          unit: "万元",
          range: 18,
        },
      ],
      xsqkb: [
        {
          imgUrl: require("../../assets/dzyg/xsabc.png"),
          name: "我省销售总量     ",
          num: "200",
          unit: "万盒",
          rankname: "全国排名",
          rank: "15",
        },
        {
          imgUrl: require("../../assets/dzyg/xse.png"),
          name: "我省销售额",
          num: "200",
          unit: "万元",
          rankname: "全国排名",
          rank: "15",
        },
      ],
      ljml: [
        {
          name: "累计毛利额(万元)",
          num: 528.1,
          unit: "万元",
        },
        {
          name: "盒均价(元)",
          num: 80.2,
          unit: "元",
        },
      ],
      ljmlbot: [
        {
          num: 272762,
          name: "烟弹(个)",
          unit: "个",
        },
        {
          num: 32781,
          name: "烟具(个)",
          unit: "个",
        },
        {
          num: 292,
          name: "套装(个)",
          unit: "个",
        },
        {
          num: 402,
          name: "一次性电子烟(个)",
          unit: "个",
        },
      ],
      xzxk: {
        zcjyh: "622",
        YoY: "1.86%",
        list: [
          {
            name: "卷烟零售户数",
            num: "287905",
            YoY: "1.91%",
          },
          {
            name: "电子烟零售户数",
            num: "622",
            YoY: "",
          },
        ],
        ullist: [
          {
            name: "今日新增户数",
            num: "81",
            namea: "今日退出户数",
            numa: "59",
          },
          {
            name: "平均入网时间",
            num: "3.79",
            namea: "网办事项",
            numa: "36556",
          },
          {
            name: "网办率",
            num: "93.10%",
            namea: "好评率",
            numa: "100%",
          },
        ],
      },
      djjga: [
        {
          name: "电子烟行政案件",
          num: 0,
          unit: "起",
          type: "01",
        },
        {
          name: "电子烟刑事案件",
          num: 0,
          unit: "起",
          type: "02",
        },
      ],
      wpcount: [
        {
          type: "73",
          name: "烟弹(万个)",
          num: 0,
          unit: "万个",
        },
        {
          type: "72",
          name: "电子烟烟具(万个)",
          num: 0,
          unit: "万个",
        },
        {
          type: "71",
          name: "电子烟套装(万个)",
          num: 0,
          unit: "万个",
        },
        {
          type: "74",
          name: "一次性电子烟(万个)",
          num: 0,
          unit: "万个",
        },
      ],
      centerlistbot: [
        {
          name: "配送周期：一周两次",
        },
        {
          name: "配送时效：最快当天、最慢隔日",
        },
        {
          name: "寄送费用：0.4元/盒",
        },
      ],
      scjg: {
        lista: [
          {
            name: "烟草网格",
            num: "1055",
          },
          {
            name: "综治网格",
            num: "1785",
          },
          {
            name: "警务网格",
            num: "1516",
          },
        ],
        listb: [
          {
            name: "有价信息率",
            num: "91.22%",
            count: "5141",
            title: "三网融合派单",
          },
          {
            name: "有价信息率",
            num: "95.02%",
            count: "32708",
            title: "三员协同派单",
          },
          {
            name: "形成案件率",
            num: "90.88%",
            count: "3146",
            title: "三岗联动派单",
          },
        ],
        listc: [
          {
            name: "人均管服户数",
            num: "272",
            YOY: "1.87%",
            tag: 1,
            unit: "户",
          },
          {
            name: "人均检查户数",
            num: "33",
            YOY: "29.46%",
            tag: 1,
            unit: "户",
          },
          {
            name: "人均查获案件数",
            num: "2.3",
            YOY: "1.72%",
            tag: 3,
            unit: "起",
          },
          {
            name: "人均查获卷烟数",
            num: "4.78",
            YOY: "29.87%",
            tag: 2,
            unit: "万支",
          },
        ],
        listd: [
          {
            name: "向未成年人售烟（含 电子烟）案件",
            num: "72",
            YoY: "10.77%",
          },
          {
            name: "罚没款收入",
            num: "3654.17",
            YoY: "4.98%",
          },
        ],
      },
      nbjk: {
        list: [
          {
            title: "真烟异流排名",
            // list:[
            //     {''},
            //     {}
            //     ]
          },
          {
            title: "真烟异流(万支)",
          },
          {
            title: "内管预警",
          },
        ],
      },
      qbyj: {
        list: [
          {
            num: "78687920111946",
            rank: "二级",
            add: "青岛-合肥",
            infor: "合肥中转部发件",
          },
          {
            num: "78687682456632",
            rank: "二级",
            add: "成都-马鞍山",
            infor: "马鞍山发件",
          },
          {
            num: "78342898189876",
            rank: "四级",
            add: "南京-黄山",
            infor: "黄山发件",
          },
          {
            num: "78687768693085",
            rank: "四级",
            add: "嘉兴-阜阳",
            infor: "阜阳发件",
          },
          {
            num: "78687813129864",
            rank: "四级",
            add: "徐州-淮北",
            infor: "淮北发件",
          },
          {
            num: "78687702450929",
            rank: "二级",
            add: "汕头-滁州",
            infor: "滁州来安县发件",
          },
          {
            num: "78343058725646",
            rank: "四级",
            add: "濮阳-合肥",
            infor: "合肥中转部发件",
          },
          {
            num: "73502108575246",
            rank: "四级",
            add: "郑州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78687806641905",
            rank: "二级",
            add: "苏州-宿州",
            infor: "宿州发件",
          },
          {
            num: "78688063109069",
            rank: "四级",
            add: "上海-亳州",
            infor: "亳州蒙城县发件",
          },
          {
            num: "78688062393686",
            rank: "二级",
            add: "荆门-滁州",
            infor: "南京中转部发件",
          },
          {
            num: "73502108585947",
            rank: "四级",
            add: "郑州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78687934953693",
            rank: "二级",
            add: "金华-宿州",
            infor: "宿州发件",
          },
          {
            num: "78687909367749",
            rank: "二级",
            add: "杭州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78688006345796",
            rank: "二级",
            add: "杭州-蚌埠",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78688009481008",
            rank: "四级",
            add: "台州-亳州",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78687931640106",
            rank: "四级",
            add: "舟山-合肥",
            infor: "合肥巢湖发件",
          },
          {
            num: "78687860856971",
            rank: "二级",
            add: "宁波-合肥",
            infor: "合肥巢湖发件",
          },
          {
            num: "78343135772119",
            rank: "四级",
            add: "新乡-亳州",
            infor: "蚌埠中转部发件",
          },
          {
            num: "73502108582182",
            rank: "四级",
            add: "郑州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "75583736787286",
            rank: "二级",
            add: "上海-阜阳",
            infor: "阜阳发件",
          },
          {
            num: "73502108589585",
            rank: "四级",
            add: "郑州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78687917163456",
            rank: "二级",
            add: "杭州-蚌埠",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78688063182914",
            rank: "二级",
            add: "杭州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78687762892028",
            rank: "二级",
            add: "上海-阜阳",
            infor: "阜阳发件",
          },
          {
            num: "78687963901584",
            rank: "二级",
            add: "绍兴-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78342990337985",
            rank: "四级",
            add: "沧州-宿州",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78687914309041",
            rank: "二级",
            add: "上海-阜阳",
            infor: "阜阳发件",
          },
          {
            num: "75583695933817",
            rank: "二级",
            add: "上海-阜阳",
            infor: "阜阳发件",
          },
          {
            num: "78688006571282",
            rank: "二级",
            add: "杭州-蚌埠",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78688006571282",
            rank: "二级",
            add: "杭州-蚌埠",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78688071448629",
            rank: "二级",
            add: "杭州-蚌埠",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78687800255020",
            rank: "二级",
            add: "杭州-合肥",
            infor: "合肥庐阳接驳站发件",
          },
          {
            num: "78343016822613",
            rank: "四级",
            add: "沧州-亳州",
            infor: "蚌埠中转部发件",
          },
          {
            num: "73502112445126",
            rank: "二级",
            add: "沧州-亳州",
            infor: "蚌埠中转部发件",
          },
          {
            num: "78687772591766",
            rank: "四级",
            add: "东莞-阜阳",
            infor: "蚌埠中转部发件",
          },
        ],
      },
      djds: {
        list: [
          {
            name: "查获案件总数",
            title: "查获案件总数",
            num: "6890",
            YoY: "3.37%",
            unit: "起",
            img: require("../../assets/qjzl/iconb1.png"),
          },
          {
            name: "涉案总金额",
            title: "涉案总金额",
            num: "20531.4104",
            YoY: "90.88%",
            unit: "万元",

            img: require("../../assets/qjzl/iconb2.png"),
          },
          {
            name: "查获卷烟总量",
            title: "查获卷烟总量",
            num: "12796.0078",
            YoY: "29.88%",
            unit: "万支",
            img: require("../../assets/qjzl/iconb3.png"),
          },
          {
            name: "查获电子烟总量",
            title: "查获电子烟总量",
            num: "1019056",
            YoY: "19795.67%",
            unit: "个",
            img: require("../../assets/qjzl/iconb4.png"),
          },
          {
            name: "查获雪茄烟总量",
            title: "查获雪茄烟总量",
            num: "478.72",
            YoY: "367.04%",
            unit: "万支",
            img: require("../../assets/qjzl/iconb5.png"),
          },
          {
            name: "查获烟丝烟叶",
            title: "查获烟丝烟叶",
            num: "83302",
            YoY: "10.05%",
            unit: "公斤",
            img: require("../../assets/qjzl/iconb6.png"),
          },
          {
            name: "查获烟机总量",
            title: "查获烟机总量",
            num: "6",
            YoY: "50%",
            unit: "台",
            img: require("../../assets/qjzl/iconb7.png"),
          },
          {
            name: "5万元以上案件",
            title: "5万元以上案件",
            num: "803",
            YoY: "42.12%",
            unit: "起",
            img: require("../../assets/qjzl/iconb8.png"),
          },
          {
            name: "刑事案件",
            title: "刑事案件",
            num: "110",
            YoY: "6.80%",
            unit: "起",
            img: require("../../assets/qjzl/iconb9.png"),
          },
          {
            name: "追刑人数",
            title: "追刑人数",
            num: "142",
            YoY: "93.94%",
            unit: "人",
            img: require("../../assets/qjzl/iconb10.png"),
          },
        ],
      },
      xxyczp: {
        list: [
          {
            name: "涉案总金额",
            num: "12.3",
            unit: "亿元",
            decimals: 1,
            img: require("../../assets/qjzl/xx1.png"),
          },
          {
            name: "涉案物品",
            num: "1089361",
            unit: "个",
            decimals: 0,
            img: require("../../assets/qjzl/xx2.png"),
          },
          {
            name: "电子烟企业",
            num: "3",
            unit: "个",
            decimals: 0,
            img: require("../../assets/qjzl/xx3.png"),
          },
          {
            name: "追刑人数",
            num: "142",
            unit: "人",
            decimals: 0,
            img: require("../../assets/qjzl/xx4.png"),
          },
        ],
      },
      qsjydata: {
        list: [
          {
            unit: "合肥市",
            num: "102.94",
            sort: "A",
          },
          {
            unit: "安庆市",
            num: "101.52",
            sort: "A",
          },
          {
            unit: "六安市",
            num: "101.29",
            sort: "A",
          },
          {
            unit: "铜陵市",
            num: "93.71",
            sort: "A",
          },
          {
            unit: "池州市",
            num: "76.33",
            sort: "B",
          },
          {
            unit: "淮北市",
            num: "69.3",
            sort: "B",
          },
          {
            unit: "滁州市",
            num: "68.65",
            sort: "B",
          },
          {
            unit: "马鞍山市",
            num: "67.71",
            sort: "B",
          },
          {
            unit: "芜湖市",
            num: "67.34",
            sort: "B",
          },
          {
            unit: "宣城市",
            num: "66.68",
            sort: "B",
          },
          {
            unit: "宿州市",
            num: "65.7",
            sort: "B",
          },
          {
            unit: "亳州市",
            num: "65.43",
            sort: "B",
          },
          {
            unit: "黄山市",
            num: "64.71",
            sort: "B",
          },
          {
            unit: "蚌埠市",
            num: "60.83",
            sort: "B",
          },
          {
            unit: "淮南市",
            num: "57.42",
            sort: "C",
          },
          {
            unit: "阜阳市",
            num: "57.02",
            sort: "C",
          },
        ],
      },
      imgdialog: require("../../assets/qjzl/dialogbg.png"),
      maplist: {
        maplista: [
          {
            name: "市场秩序",
            color: "#C6FF83",
          },
          {
            name: "真烟异动",
            color: "#4B7902",
          },
          {
            name: "执法力度",
            color: "#83FBFF",
          },
          {
            name: "经营信心",
            color: "#FF83A3",
          },
        ],
        maplistb: [
          {
            name: "A：优≥80",
            color: "#00FF06",
          },
          {
            name: "B：80＞良≥60",
            color: "#007CEC",
          },
          {
            name: "C：差＜60",
            color: "#FF0000",
          },
        ],
      },
      anhuiarr: [
        {
          name: "蚌埠市",
          value: [117.003228, 33.099667],
        },
        {
          name: "合肥市",
          value: [116.953042, 31.86119],
        },
        {
          name: "芜湖市",
          value: [117.930051, 31.226319],
        },
        {
          name: "宣城市",
          value: [118.397995, 30.495667],
        },
        {
          name: "池州市",
          value: [117.139157, 30.296037],
        },
        {
          name: "亳州市",
          value: [116.002939, 33.550338],
        },
        {
          name: "铜陵市",
          value: [117.216576, 30.909935],
        },
        {
          name: "淮北市",
          value: [116.794664, 33.971707],
        },
        {
          name: "淮南市",
          value: [116.818329, 32.347574],
        },
        {
          name: "黄山市",
          value: [117.697325, 29.909239],
        },
        {
          name: "安庆市",
          value: [116.203551, 30.50883],
        },
        {
          name: "滁州市",
          value: [117.670264, 32.533627],
        },
        {
          name: "阜阳市",
          value: [115.250729, 32.956969],
        },
        {
          name: "宿州市",
          value: [117.134084, 33.783891],
        },
        {
          name: "马鞍山市",
          value: [118.507906, 31.569362],
        },
        {
          name: "六安市",
          value: [115.857676, 31.552889],
        },
      ],
      regionsdata: [
        {
          name: "蚌埠市",
          namea: "蚌埠",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "合肥市",
          namea: "合肥",
          littitle: "A",
          itemStyle: {
            color: "rgba(0, 255, 6, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "芜湖市",
          namea: "芜湖",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "宣城市",
          namea: "宣城",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "池州市",
          namea: "池州",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "亳州市",
          namea: "亳州",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "铜陵市",
          namea: "铜陵",
          littitle: "A",
          itemStyle: {
            color: "rgba(0, 255, 6, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "淮北市",
          namea: "淮北",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "淮南市",
          namea: "淮南",
          littitle: "C",
          itemStyle: {
            color: "rgba(255, 0, 0, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "黄山市",
          namea: "黄山",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "安庆市",
          namea: "安庆",
          littitle: "A",
          itemStyle: {
            color: "rgba(0, 255, 6, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "滁州市",
          namea: "滁州",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "阜阳市",
          namea: "阜阳",
          littitle: "C",
          itemStyle: {
            color: "rgba(255, 0, 0, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "宿州市",
          namea: "宿州",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "马鞍山市",
          namea: "马鞍山",
          littitle: "B",
          itemStyle: {
            color: "rgba(0, 124, 236, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
        {
          name: "六安市",
          namea: "六安",
          littitle: "A",
          itemStyle: {
            color: "rgba(0, 255, 6, 1)", //省份背景色
          },
          list: [
            {
              name: "规划电子烟持证户数",
              num: "36736",
              unit: "户",
            },
            {
              name: "现有电子烟持证户",
              num: "159",
              unit: "户",
            },
            {
              name: "实际持证户占比",
              num: "20%",
              unit: "",
            },
          ],
        },
      ],
      outflow: {
        list: [
          {
            name: "红三环",
            addres: "（渡江）",
            num: "74.54",
          },
          {
            name: "黄山",
            addres: "（嘉宾迎客松）",
            num: "53.02",
          },
          {
            name: "利群",
            addres: "（新版）",
            num: "30.54",
          },
          {
            name: "黄山",
            addres: "（新一品）",
            num: "29.32",
          },
          {
            name: "黄山",
            addres: "（印象一品）",
            num: "20.90",
          },
          {
            name: "云烟",
            addres: "（紫）",
            num: "19.82",
          },
          {
            name: "红河",
            addres: "（软甲）",
            num: "18.12",
          },
          {
            name: "哈德门",
            addres: "（纯香）",
            num: "15.54",
          },
          {
            name: "红双喜",
            addres: "（硬）",
            num: "14.48",
          },
          {
            name: "黄山",
            addres: "（新制皖烟)",
            num: "13.94",
          },
        ], //真烟流出品规
        lista: [
          {
            name: "中华",
            addres: "（硬）",
            num: "21.58",
          },
          {
            name: "黄山",
            addres: "（新制皖烟)",
            num: "14.26",
          },
          {
            name: "红金龙",
            addres: "（软蓝九）",
            num: "11.1",
          },
          {
            name: "黄山",
            addres: "（徽商新概念）",
            num: "9.66",
          },
          {
            name: "中华",
            addres: "（软蓝九州腾龙）",
            num: "8.32",
          },
          {
            name: "贵烟",
            addres: "（跨越）",
            num: "7.38",
          },
          {
            name: "红金龙",
            addres: "（硬新版）",
            num: "6.46",
          },
          {
            name: "玉溪",
            addres: "（软）",
            num: "6.0",
          },
          {
            name: "娇子",
            addres: "（X）",
            num: "5.9",
          },
          {
            name: "利群",
            addres: "（新版)",
            num: "5.9",
          },
        ], //真烟流入品规
      },
      dataflow: {
        xAxis: [
          "浙江",
          "江西",
          "江苏",
          "广东",
          "湖北",
          "湖南",
          "河北",
          "上海",
          "四川",
          "福建",
          "内蒙",
          "云南",
          "山东",
          "山西",
          "河南",
          "陕西",
          "宁夏",
          "辽宁",
          "北京",
          "甘肃",
          "海南",
          "黑龙江",
          "青海",
          "贵州",
          "广西",
        ],
        yAxis: [
          "393.94",
          "35.98",
          "32.8",
          "20.32",
          "18.14",
          "10.14",
          "8.42",
          "6.02",
          "5.76",
          "5.28",
          "1.82",
          "1.42",
          "1.06",
          "1.02",
          "0.62",
          "0.44",
          "0.22",
          "0.22",
          "0.2",
          "0.14",
          "0.06",
          "0.04",
          "0.02",
          "0.02",
          "0.02",
        ],
      },
      dataflowa: {
        xAxis: [
          "河南",
          "江苏",
          "湖北",
          "浙江",
          "上海",
          "河北",
          "四川",
          "江西",
          "广东",
          "山东",
          "湖南",
          "辽宁",
          "吉林",
          "贵州",
          "云南",
          "陕西",
          "黑龙江",
          "海南",
          "内蒙",
          "重庆",
          "北京",
          "福建",
          "广西",
          "新疆",
          "山西",
          "甘肃",
          "青海",
          "天津",
          "宁夏",
        ],
        yAxis: [
          "28",
          "26.78",
          "22.36",
          "18.2",
          "13.54",
          "9.58",
          "8.78",
          "7.66",
          "6.94",
          "5.94",
          "5.64",
          "5.62",
          "5.16",
          "4.34",
          "3.96",
          "3.62",
          "3.24",
          "3.18",
          "2.84",
          "2.5",
          "2.22",
          "1.62",
          "1.44",
          "1.22",
          "1.02",
          "0.92",
          "0.5",
          "0.32",
          "0.08",
        ],
      },
      picktimeTemp: {},
      LeftListTitle: "月销量排名",
      LeftListColumns: [],
      LeftListItems: [],
      RightListTitle: "订货比排名",
      RightListColumns: [],
      RightListItems: [],
    };
  },
  watch: {
    NightingaleaTot(newval) {
      console.log(newval);
      //  this.Nightingalea('Nightingalea')
    },
    "titleMap.uuid": {
      handler(newVal, oldVal) {
        localStorage.setItem("mapUuid", newVal);
      },
      immediate: true,
    },
    "columnName": {
      handler(newVal, oldVal) {
        localStorage.setItem("columnName", newVal);
      },
      immediate: true,
    }
  },
  components: {
    Anhui,
    anhuiMap,
    citySaleData,
    timePicker,
    CustomList,
  },
  computed: {
    scrollOption() {
      return {
        // step: 1,
        // hoverStop: true, // 是否开启鼠标悬停stop
        // direction: 1, // 0向下 1向上 2向左 3向右
        // openWatch: true, // 开启数据实时监控刷新dom
        // singleHeight: 48, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        // waitTime: 20, // 单步运动停止的时间(默认值1000ms)
        step: 0.2,
        hoverStop: true, // 是否开启鼠标悬停stop
        direction: 1, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        waitTime: 3000, // 单步运动停止的时间(默认值1000ms)
        limitMoveNum: 0,
      };
    },
    scrollOptiona() {
      return {
        // step: 0.6,
        // hoverStop: true, // 是否开启鼠标悬停stop
        // direction: 1, // 0向下 1向上 2向左 3向右
        // openWatch: true, // 开启数据实时监控刷新dom
        // singleHeight: 25, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        // waitTime: 30, // 单步运动停止的时间(默认值1000ms)
        step: 0.2,
        hoverStop: true, // 是否开启鼠标悬停stop
        direction: 1, // 0向下 1向上 2向左 3向右
        openWatch: true, // 开启数据实时监控刷新dom
        singleHeight: 0, // 单步运动停止的高度(默认值0是无缝不停止的滚动) direction => 0/1
        waitTime: 3000, // 单步运动停止的时间(默认值1000ms)
        limitMoveNum: 0,
      };
    },
  },
  created() {
    this.$nextTick(() => {
      this.citySaleDataRef = this.$refs.citySaleDataCom;
    });
    this.timer = setInterval(this.getTime, 1000);
    // this.initData(
    //   "prov_org_uuid",
    //   "00000000000000000000000011340001",
    //   "安徽省"
    // );
  },
  mounted() {
    this.time = this.getNowDate();
    // let _this = this;
    // window.addEventListener("setItemEvent", (event) => {
    //   if (event.key === "PICKTIME") {
    //     _this.picktimeTemp = JSON.parse(event.newValue)
    //     // console.log(event.newValue);
    //     if (_this.titleMap.level === 1) {
    //       _this.initData(
    //         "prov_org_uuid",
    //         "00000000000000000000000011340001",
    //         "安徽省"
    //       );
    //     } else if (_this.titleMap.level === 2) {
    //       _this.initData(
    //         "city_org_uuid",
    //         _this.titleMap.uuid,
    //         _this.titleMap.name
    //       );
    //     } else {
    //       _this.initData(
    //         "county_org_uuid",
    //         _this.titleMap.uuid,
    //         _this.titleMap.name
    //       );
    //     }
    //   }
    // });
    // this.fjps("fjps");
    // this.khylfun("khyl");
    // this.Nightingaleb("Nightingaleb");
    // this.barbotfun("barbot");
  },
  metaInfo: {
    meta: [{ name: "referrer", content: "no-referrer" }],
  },
  methods: {
    timeChangeFn(timeObj) {
      console.log(timeObj, "timeobj------------");
      this.picktimeTemp = timeObj;
      /**日期格式修改 */
      this.picktimeTemp.endDate = this.picktimeTemp.endDate.replace("月","").replace("日","");
      this.picktimeTemp.lastEndDate = this.picktimeTemp.lastEndDate.replace("月","").replace("日","");
      sessionStorage.setItem("certificateTimObj", JSON.stringify(timeObj));
      if (this.titleMap.level === 1) {
        this.initData(
          "prov_org_uuid",
          "00000000000000000000000011340001",
          "安徽省"
        );
      } else if (this.titleMap.level === 2) {
        this.initData("city_org_uuid", this.titleMap.uuid, this.titleMap.name);
      } else {
        this.initData(
          "county_org_uuid",
          this.titleMap.uuid,
          this.titleMap.name
        );
      }
    },
    //分拣配送echarts
    fjpsInit(id) {
      console.log("this.xsqsEchartsData", this.xsqsEchartsData);
      var that = this;
      let myChart = this.$echarts.init(document.getElementById(id));
      let DataName = [];
      let provinceArr = [];
      let countryArr = [];
      if (that.titleMap.name === "安徽省") {
        that.xsqsEchartsData.forEach((org) => {
          if (org.org_name === "全国") countryArr.push(org);
          if (org.org_name === "安徽省") provinceArr.push(org);
          DataName = [
            "全国销售额（万元）",
            "安徽省销售额（万元）",

            "销售额月销售额排名",
          ];
        });
      } else {
        that.xsqsEchartsData.forEach((org) => {
          if (org.org_name === "安徽省") countryArr.push(org);
          if (org.org_name === that.titleMap.name) provinceArr.push(org);
        });
        DataName = [
          "安徽省销售额（万元）",
          `${that.titleMap.name}销售额（万元）`,

          "销售额月销售额排名",
        ];
      }

      let xData = countryArr.map((k) => Number(k.ym) + "月");
      let OneData = countryArr.map((k) => k.sale_amt);
      let TwoData = provinceArr.map((k) => k.sale_amt);
      let max = formatMaxNum(Math.max(...TwoData), 2) * 2;
      // let min = formatMinNum(Math.min(...OneData));
      // console.log(max, min, "===========");
      let rateData = provinceArr.map((k) => k.sale_amt_rank);
      let option = {
        tooltip: {
          show: true,
          trigger: "axis",
          axisPointer: {
            type: "cross",
            label: {
              // show:true,
              // margin:0,
              lineHeight: 20,
            },
            crossStyle: {
              color: "#666",
            },
          },
          formatter: function (params, ticket, callback) {
            var res = params[0].name;

            for (var i = 0, l = params.length; i < l; i++) {
              res +=
                "<br/>" +
                params[i].seriesName +
                " : " +
                (params[i].value ? params[i].value : "-");
            }
            res += "<br/>" + "月销售额排名：" + rateData[params[0].dataIndex];
            return res;
          },
        },
        legend: {
          data: DataName,
          // icon: "circle",
          right: 0,
          top: 0,
          textStyle: {
            fontSize: "10",
            color: "rgba(255,255,255,0.7)",
          },
        },
        grid: {
          left: "0",
          right: "0",
          bottom: "0",
          top: "30%",
          containLabel: true,
        },
        xAxis: [
          {
            type: "category",
            data: xData,
            axisPointer: {
              type: "shadow",
            },
            // boundaryGap: false, //让x轴坐标从紧挨着y轴开始
            // 坐标轴线
            axisLine: {
              show: false,
              lineStyle: {
                color: "rgba(255,255,255,0.7)", //X轴字体颜色
                fontSize: "12",
              },
            },
            axisTick: {
              show: false, //去掉图表横纵坐标轴刻度线
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位：万元",
            nameTextStyle: {
              color: "rgba(255, 255, 255, 0.5)",
              fontSize: 12,
            },

            // interval: 10,
            axisLabel: {
              formatter: "{value}",
              textStyle: {
                color: "rgba(255,255,255,0.7)", //Y轴内容文字颜色
              },
            },
            axisLine: {
              show: true,
              lineStyle: {
                color: "rgba(66, 164, 255, 0.3)", //y轴
                type: "solid",
                // fontSize: '12',
              },
            },
            splitLine: {
              show: false,
              lineStyle: {
                type: "solid",
                color: "rgba(66, 164, 255, 0.3)", //里面横着的虚线
              },
            },
          },
          {
            type: "value",
            name: "单位：万元",
            nameTextStyle: {
              color: "rgba(255, 255, 255, 0.5)",
              fontSize: 12,
            },
            min: 0,
            max: max,
            // min: 0,
            // max: 500,
            // interval: 10,
            axisLabel: {
              formatter: "{value}",
              textStyle: {
                color: "rgba(255,255,255,0.7)", //Y轴内容文字颜色
              },
            },
            axisLine: {
              show: true,
              lineStyle: {
                color: "rgba(66, 164, 255, 0.3)", //y轴
                type: "solid",
                // fontSize: '12',
              },
            },
            splitLine: {
              show: false,
              lineStyle: {
                type: "solid",
                color: "rgba(66, 164, 255, 0.3)", //里面横着的虚线
              },
            },
          },
          // {
          //   type: "value",
          //   name: "单位：名",
          //   nameLocation: "start", // 坐标轴名称显示位置。('start''middle''center''end')
          //   inverse: true,
          //   position: "right",
          //   nameTextStyle: {
          //     color: "rgba(255, 255, 255, 0.5)",
          //     fontSize: 12,
          //   },

          //   min: 0,
          //   max: 35,
          //   // interval: 20,
          //   axisLabel: {
          //     formatter: "{value}",
          //     textStyle: {
          //       color: "rgba(255,255,255,0.7)", //Y轴内容文字颜色
          //     },
          //   },
          //   axisLine: {
          //     show: false,
          //     lineStyle: {
          //       color: "rgba(66, 164, 255, 0.3)", //y轴
          //       type: "solid",
          //       // fontSize: '12',
          //     },
          //   },
          //   splitLine: {
          //     show: true,
          //     lineStyle: {
          //       type: "solid",
          //       color: "rgba(66, 164, 255, 0.3)", //里面横着的虚线
          //     },
          //   },
          // },
        ],
        series: [
          {
            name: DataName[0],
            type: "line",
            data: OneData,
            barWidth: "12",
            yAxisIndex: 0,
            // seriesLayoutBy: 'row',
            itemStyle: {
              // barBorderRadius: [30, 30, 0, 0],
              color: {
                x: 0,
                y: 0,
                x2: 1,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(179, 90, 9)",
                  }, //第一顶部颜色
                  {
                    offset: 1,
                    color: "rgba(179, 90, 9)",
                  }, //第一底部颜色
                ],
              },
            },
            areaStyle: {
              // 折现下是否填充
              color: {
                type: "linear",
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(179, 90, 9)", // 0% 处的颜色
                  },
                  {
                    offset: 1,
                    color: "rgba(0,0,0,0.1)", // 100% 处的颜色
                  },
                ],
                global: false,
              },
            },
          },
          {
            name: DataName[1],
            yAxisIndex: 1,
            type: "line",
            data: TwoData,
            barWidth: "12",
            //seriesLayoutBy: 'row',
            itemStyle: {
              // barBorderRadius: [30, 30, 0, 0],
              color: {
                x: 0,
                y: 0,
                x2: 1,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(8, 180, 111)",
                  }, //第二顶部颜色
                  {
                    offset: 1,
                    color: "rgba(8, 180, 111)",
                  }, //第二底部颜色
                ],
              },
            },
            areaStyle: {
              // 折现下是否填充
              color: {
                type: "linear",
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(8, 180, 111)", // 0% 处的颜色
                  },
                  {
                    offset: 1,
                    color: "rgba(0,0,0,0.1)", // 100% 处的颜色
                  },
                ],
                global: false,
              },
            },
          },
          // 折线图
          // {
          //   name: DataName[2],
          //   type: "line",
          //   // smooth: true,
          //   showAllSymbol: true,
          //   symbol: "emptyCircle",
          //   symbolSize: 5,
          //   yAxisIndex: 1,
          //   data: rateData,
          //   itemStyle: {
          //     normal: {
          //       color: "rgb(66, 199, 222)",
          //     },
          //   },
          // },
        ],
      };
      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option, true);
      window.addEventListener("resize", function () {
        myChart.resize();
      });
    },
    // 地图返回
    mapBack(index) {
      let that = this;
      that.titleMap.level = index + 1;
      console.log(index, "地图返回试试,");
      if (that.titleMap.level == 1) {
        that.clickArea = [];
        that.titleMap.name = "安徽省";
        that.titleMap.uuid = "00000000000000000000000011340001";
        that.clickArea.push(that.titleMap.name);
        console.log(that.titleMap, "地图返回,");
        this.showCityData = false;
        that.initData("prov_org_uuid", that.titleMap.uuid, that.titleMap.name);
      }
      // else{
      //   console.log(that.titleMap,"返回地市")
      //    that.initData("city_org_uuid",that.titleMap.uuid,that.titleMap.oldName);
      // }
    },
    //初始化数据
    initData(columnName, orgUuid, name) {
      let that = this;
      let date = new Date();
      that.columnName = columnName;
      that.titleMap.uuid = orgUuid;
      // 上个月所属年份
      let preYear = getPrevMonth()[0];
      // 上个月
      let prevMonth = getPrevMonth()[1];
      const req1 = getECigarHoldLicNum({
        ...that.picktimeTemp,
        columnName,
        orgUuid,
      });
      const req2 = getECigarCaseNum({
        ...that.picktimeTemp,
        columnName,
        orgUuid,
      });
      const req3 = getMapData({
        ...that.picktimeTemp,
        columnName: "prov_org_uuid",
        orgUuid: "00000000000000000000000011340001",
      });

      const req4 = getElectronicCigTradeMgt({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        columnName,
        orgUuid,
      });
      const req5 = getElectronicCigSaleStat({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        columnName,
        orgUuid,
      });
      const req6 = getElectronicCigCustProft({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        columnName,
        orgUuid,
      });
      const req7 = getECigarAmtData({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        orgUuid,
      });
      const req8 = getQtyTotal({
        ...that.picktimeTemp,
        columnName,
        orgUuid,
      });
      const req9 = getEnterpriseGrossProfit({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        columnName,
        orgUuid,
      });
      const req10 = getEnterpriseOrderRatioRanking({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        columnName,
        orgUuid,
      });
      const req11 = getEnterpriseSellNumberRanking({
        ...that.picktimeTemp,
        year: preYear,
        month: prevMonth,
        columnName,
        orgUuid,
      });
      const req12 = getEcigarBmkData({
        year: preYear,
        month: prevMonth,
        // columnName,
        orgUuid,
      })
      Promise.all([req1, req2, req3, req4, req5, req6, req7, req8, req9,req10,req11,req12])
        .then(function (results) {
          // 行政许可
          const data1 = results[0];
          console.log(data1, "行政许可");
          that.xzxkcount.forEach((k) => {
            if (k.code) {
              k.num = data1[k.code].data[0]?.num;
            }
            if (k.code === "planningCapacity") data1[k.code].data[0]?.num;
            if (k.code === "holdLicenseNum") data1[k.code].data[0]?.num;
          });
          that.jsps = [
            {
              name: "申请数量(个)",
              num: data1.applyPassData.data[0]?.apply_num,
            },
            {
              name: "通过数量(个)",
              num: data1.applyPassData.data[0]?.apply_pass_num,
            },
          ];
          // 打击监管
          const data2 = results[1];
          console.log(data2, "打击监管");
          that.djjga.forEach(
            (k) =>
              (k.num = data2.xzxsCaseNum.data.find(
                (k2) => k2.case_type === k.type
              )?.num)
          );
          // todo
          /*  that.djjga = [
        {
          name: "电子烟行政案件",
          num: 511,
          unit: "起",
          type: "02",
        },
        {
          name: "电子烟刑事案件",
          num: 13,
          unit: "起",
          type: "01",
        },
      ] */
          // 电子烟案件饼图 增加或修改其他选项（使得饼图总数据与上侧案件总数一致）
          that.NightingaleaData = [
            {
              value: data2.wcnCaseNum.data[0].wcn,
              name: "向未成年人销售电子烟",
            },
            {
              value: data2.wcnCaseNum.data[0].wdqp,
              name: "未在当地批发企业进货",
            },
            {
              value: data2.wcnCaseNum.data[0].xssc,
              name: "销售非法生产电子烟",
            },
            {
              value: data2.wcnCaseNum.data[0].other,
              name: "其他",
            },
          ];
         const XZCasetotal  =  that.NightingaleaData.reduce(
            (pre, cur) => pre + cur.value,
            0
          );
          if(XZCasetotal!=that.djjga[0].num){
            let num =Number(that.NightingaleaData[3].value) + Number(that.djjga[0].num)-Number(XZCasetotal)
            if(num>=0){
              that.NightingaleaData[3].value =num
            }else{
              that.NightingaleaData[3].value =0
            }
          }
          // console.log(11,XZCasetotal,that.djjga[0].num,that.NightingaleaData);
          // 饼图2
          that.NightingalebData = [
            {
              value: data2.ffjyCaseNum.data[0].ffjy,
              name: "非法经营罪",
            },
            {
              value: data2.ffjyCaseNum.data[0].ffsc,
              name: "生产销售伪劣产品罪",
            },
            {
              value: data2.ffjyCaseNum.data[0].ffxs,
              name: "销售假冒注册商标的商品罪",
            },
            {
              value: 0,
              name: "其他",
            },
          ];
          const XSCasetotal  =  that.NightingalebData.reduce(
            (pre, cur) => pre + cur.value,
            0
          );
          if(XSCasetotal!=that.djjga[1].num){
            let num =Number(that.NightingalebData[3].value) + Number(that.djjga[1].num)-Number(XSCasetotal)
            if(num>=0){
              that.NightingalebData[3].value =num
            }else{
              that.NightingalebData[3].value =0
            }
          }
          setTimeout(()=>{
            that.Nightingalea("Nightingalea");
            that.Nightingaleb("Nightingaleb");
          },100)

          const data8 = results[7];
          // that.wpcount.forEach(
          //   (k) =>
          //     (k.num = data2.goodsQtyNum.data.find(
          //       (k2) => k.type === k2.goodsType
          //     )?.num)
          // );
          that.wpcount.forEach(
            (k) =>
              (k.num = data8.ecigarQty.data.find(
                (k2) => k.type === k2.goodsType
              )?.num)
          );
       
          

          //地图
          const data3 = results[2];
          console.log(data3, "地图数据");

          that.mapData = [];
          if (that.titleMap.level == 2) {
            data3.mapData.data.map((item) => {
              if (that.titleMap.name == item.orgName) {
                that.mapData.push(
                  Object.assign({}, item, {
                    name: item.orgName.replace("烟草专卖局", ""),
                    value: item.capacityPlanLicQty,
                    value1: item.holdACertificateNum,
                    value2: item.prop,
                  })
                );
              }
            });
          } else {
            data3.mapData.data.map((item) => {
              that.mapData.push(
                Object.assign({}, item, {
                  name:
                    that.titleMap.level == 2
                      ? item.orgName
                          .replace("烟草专卖局", "")
                          .replace("合肥市", "")
                          .replace("安徽省", "")
                          .replace("芜湖市", "")
                      : item.orgName.replace("烟草专卖局", ""),
                  value: item.capacityPlanLicQty,
                  value1: item.holdACertificateNum,
                  value2: item.prop,
                })
              );
            });
          }

          let addres = that.dataMaps[name];
          if (that.titleMap.level == 1) {
            addres += "_full.json";
          } else {
            addres += ".json";
          }
          axios
            .get("https://geo.datav.aliyun.com/areas_v3/bound/" + addres)
            .then(function (res) {
              that.dataMap = res.data;

              that.mapCrackDown("centerMap");
              // that.clickArea.push()
            })
            .catch(function (error) {
              console.log(error);
            });

          //交易管理
          const data4 = results[3];
          console.log(data4, "交易管理");

          that.jygla[0].num = data4.tradeQty.data[0]?.sale_brand_avg;
          that.jygla[2].num = data4.tradeQty.data[0]?.sale_spec_avg;
          that.jygla[1].num = data4.tradeQty.data[0]?.prov_sale_brand_qty;
          that.jygla[1].range = data4.tradeQty.data[0]?.prov_sale_brand_rank;
          that.jygla[3].num = data4.tradeQty.data[0]?.prov_sale_spec_qty;
          that.jygla[3].range = data4.tradeQty.data[0]?.prov_sale_spec_rank;

          sessionStorage.setItem("jygla", JSON.stringify(that.jygla));
          //销售情况
          const data5 = results[4];
          console.log(data5, "销售情况");
          that.xsqka[0].num = data5.saleStat.data[0]?.sale_qty_y;
          that.xsqka[2].num = data5.saleStat.data[0]?.sale_amt_y;
          that.xsqka[1].num = data5.saleStat.data[0]?.prov_sale_qty_y;
          that.xsqka[3].num = data5.saleStat.data[0]?.prov_sale_amt_y;
          // todo
          // that.xsqka[3].num = data5.saleStat.data[0]?.prov_sale_amt_y;
          that.ljml[0].num = data5.saleStat.data[0]?.profit_amt;
          that.ljml[1].num = data5.saleStat.data[0]?.box_price_avg;
          that.ljmlbot[0].num = data5.saleStat.data[0]?.smoke_bomb_qty;
          that.ljmlbot[1].num = data5.saleStat.data[0]?.smoke_utensils_qty;
          that.ljmlbot[2].num = data5.saleStat.data[0]?.smoke_suit_qty;
          that.ljmlbot[3].num = data5.saleStat.data[0]?.disposable_elec_cig_qty;
          //客户盈利
          const data6 = results[5];
          console.log(data6, "客户盈利");
          /*   that.custProft = data6.custProft.data;
          that.khylfun("khyl"); */
          // 销售趋势
          const data7 = results[6];
          console.log(data6, "销售趋势");
          that.xsqsEchartsData = data7.eleAmt.data;
          that.fjpsInit("fjps-box");

          const data9 = results[8];
          console.log(
            "电子烟批发企业毛利额趋势",
            data9.enterpriseGrossProfit.data
          );
          that.custProft = data9.enterpriseGrossProfit.data;
          that.khylfun("khyl");


        

          const data10=results[9]
          console.log('电子烟订货比排名-右',results[9]);
          that.RightListColumns = data10.colDef.data.sort((sta,next)=>{
            return sta.colOrder - next.colOrder
          }).map(k=>k.colName)
          that.RightListItems=[]
          data10.enterpriseOrderRatioRanking.data.forEach((item)=>{
            that.RightListItems.push({
              col1:item.ranking,
              col2:item.orgName,
              col3:item.orderRatio,
            })
          })

          const data11=results[10]
          console.log('电子烟销量排名-左',results[10]);
          that.LeftListColumns = data11.colDef.data.sort((sta,next)=>{
            return sta.colOrder - next.colOrder
          }).map(k=>k.colName)
          that.LeftListItems=[]
          data11.enterpriseSellNumberRanking.data.forEach((item)=>{
            that.LeftListItems.push({
              col1:item.ranking,
              col2:item.orgName,
              col3:item.sellNumber,
            })
          })

          const data12=results[11].ecigarBmkData.data
          console.log('电子烟对标接口',data12);

          let XData=[]
          let YData1 = [];
          let YData2 = [];
          data12.forEach(item=>{
            XData.push(item.org_name)
            YData1.push(item.hold_lic_num_ranking)
            YData2.push(item.sell_product_ranking)
          })
          that.barInit('CertifiedAccountBar',XData,YData1,'户')
          that.barInit('SpecificationQuantityBar',XData,YData2,'个')

        })
        .catch(function (error) {
          console.log(error, "error");
        });
    },
    //双击下钻地图
    changeMap(dbArea, name) {
      console.log(dbArea, "双击地图下钻");

      let that = this;
      that.titleMap.level++;
      if (that.titleMap.level > 2) return;
      that.titleMap.name = name;
      //  this.timer = setInterval(this.getTime, 1000);
      if (that.titleMap.level == 2) {
        that.titleMap.oldName = name;
        that.titleMap.uuid = dbArea.orgUuid;
      }
      console.log(that.titleMap, "下钻地区");
      if (that.clickArea.length < 3) that.clickArea.push(that.titleMap.name);
      if (that.titleMap.level == 2) {
        that.initData("city_org_uuid", dbArea.orgUuid, name);
        let fullYear = getPrevMonth()[0];
        let month = getPrevMonth()[1];
        that.orgUuid = dbArea.orgUuid;
        that.showCityData = true;
      }

      // else{
      //   that.initData("county_org_uuid",dbArea.orgUuid,name);
      // }
    },
    //下钻地图
    mapCrackDown(id) {
      let that = this;
      let imgUrl = require("../../assets/qjzl/dialogbg.png");
      // let min=that.mapData.sort((a, b) => a.value - b.value)[0].value;
      // let max = that.mapData.sort((a, b) => a.value - b.value)[that.mapData.length-1].value;
      // console.log(min,"min");
      // console.log(max,"max");
      let options = {
        tooltip: {
          show: true,
          backgroundColor: "rgba(0,0,0,0)",
          borderWidth: "0",
          formatter: function (params) {
            var res = `<div style="min-width:280px;background:url(${imgUrl}) no-repeat;background-size:100% 100%;padding:20px 30px;">
                  <div style="width:100%;margin:0 auto;padding:0 auto;text-align:center;font-size:16px;font-weight:bold;color:#fff;">
                    ${params.name}
                  </div>
                    ${that.formatterCustom(params.data)}
                </div>`;

            return res;
          },
        },
        //地图背景颜色
        // visualMap: {
        //   left: 'right',
        //   min: min,
        //   max: max,
        //   show: false,
        //   inRange: {
        //     color: [
        //     '#313695',
        //   '#4575b4',
        //   '#74add1',
        //   '#fdae61',
        //   '#f46d43',
        //   '#d73027',
        //   '#a50026'
        //     ]
        //   },
        //   text: ['High', 'Low'],
        //   calculable: true
        // },
        // 地图的阴影底图
        geo: {
          map: "anhui",
          zoom: 1.2,
          top: "15px",
          roam: false,
          layoutCenter: ["50%", "50%"], //位置
          layoutSize: "80%", //大小
          itemStyle: {
            normal: {
              areaColor: {
                type: "radial",
                x: 0.5,
                y: 0.5,
                r: 0.8,
                colorStops: [
                  {
                    offset: 0,
                    color: "#09132c", // 0% 处的颜色
                  },
                  {
                    offset: 1,
                    color: "#274d68", // 100% 处的颜色
                  },
                ],
                globalCoord: true, // 缺省为 false
              },
              borderWidth: 6, //设置外层边框
              borderColor: "rgba(66, 199, 222,1)",
              shadowColor: "rgb(59, 11, 62)",
              shadowOffsetX: 10,
              shadowOffsetY: 11,
            },
          },
        },
        series: [
          {
            type: "map",
            map: "anhui",
            top: "50px",
            // aspectScale: 0.9,
            // layoutCenter: ["50%", "50%"], //地图位置
            // layoutSize: "100%",
            layoutCenter: ["50%", "50%"], //位置
            layoutSize: "80%", //大小
            zoom: 1.2,
            label: {
              normal: {
                show: true,
                fontFamily: "SourceHanSansCN",
                fontSize: "12",
                color: "#FEFEFE",
              },
              emphasis: {
                show: true,
                fontFamily: "SourceHanSansCN",
                fontSize: "12",
                color: "#FEFEFE",
              },
            },
            itemStyle: {
              areaColor: "rgba(5, 107, 158, 1)",
              color: "#2B5890", //地图颜色
              // borderWidth: 2, //分界线wdith
              // borderColor: "#000", //分界线颜色
              borderColor: "rgba(9, 13, 63,1)",
              borderWidth: 1,
              emphasis: {
                show: true,
                areaColor: "#ff7200", //鼠标滑过区域颜色
                label: {
                  show: true,
                  textStyle: {
                    color: "#fff",
                  },
                },
              },
            },
            // zlevel: 1,
            data: that.mapData,
          },
        ],
      };
      that.$nextTick(() => {
        let myChart = that.$echarts.init(document.getElementById(id));
        that.regionsdata = [];
        if(myChart.getOption()){
          myChart.dispose();
          myChart = that.$echarts.init(document.getElementById(id));
        }
        that.$echarts.registerMap("anhui", that.dataMap);
        myChart.clear();
        console.log(that.mapData, "地图下钻数据");
        myChart.setOption(options);
        myChart.resize();
        myChart.off("dblclick");
        myChart.on("dblclick", (data) => {
          console.log(data, "lalalall");
          this.changeMap(data.data, data.name);
        });
        myChart.on("mousemove", (param) => {
          if (!param.data) return;
          // that.mapbar("mapbar", param.data);
        });
        tools.loopShowTooltip(
          myChart,
          options,
          {
            loopSeries: true,
          },
          this
        );
      });
    },

    formatterCustom(data) {
      return `<div class="width100per magbot15dzyg">

<div class="width100per dflex justifybetween alignitem bluebg magtop9dzyg padrounddzyg">
                   <div class="justifycont alignitem partflex magright13dzyg">
                     <span class="fontsize14 fontweight whitecolor">规划电子烟持证户数</span>
                   </div>
                   <div class="justifycont alignitem aligncon">
                   <span class="lightblue fontsize21 fontweight">${
                     data?.value || 0
                   }</span>
                   <span class="fontsize14 fontweight whitecolor">户</span>
                   </div>

</div>
        <div class="width100per dflex justifybetween alignitem bluebg magtop4dzyg padrounddzyg">
                   <div class="justifycont alignitem partflex magright13dzyg">
                     <span class="fontsize14 fontweight whitecolor">现有电子烟持证户</span>
                   </div>
                   <div class="justifycont alignitem aligncon">
                   <span class="lightblue fontsize21 fontweight">${
                     data?.value1 || 0
                   }</span>
                   <span class="fontsize14 fontweight whitecolor">户</span>
                   </div>

</div>
        <div class="width100per dflex justifybetween alignitem bluebg magtop4dzyg padrounddzyg">
                   <div class="justifycont alignitem partflex magright13dzyg">
                     <span class="fontsize14 fontweight whitecolor">实际持证户占比</span>
                   </div>
                   <div class="justifycont alignitem aligncon">
                   <span class="lightblue fontsize21 fontweight">${
                     data?.value2 || 0
                   }%</span>
                   </div>

</div>

</div>`;
    },
    rawLine(map, id) {
      let that = this;
      // 阴影区域
      // let option = {
      //     tooltip: {
      //         show: true,
      //         backgroundColor: "rgba(0,0,0,0)",
      //         borderWidth: "0",
      //         formatter: function (params) {
      //     var str='';
      //     for(var i=0;i<params.data.list.length;i++){
      //            str+=`<div class="width100per dflex justifycont alignitem">`+`<div class="justifycont alignitem">`+params.data.list[i].name+`</div>`+`<div class="justifycont alignitem">`+params.data.list[i].num+`<span>`+params.data.list[i].unit+`</span>`+`</div>`+`</div>`
      //     }
      //             var res =
      //                 `<div style="width:280px;background:url(` +
      //                 that.imgUrl +
      //                 `) no-repeat;background-size:100% 100%;padding:20px 30px;"><div style="width:100%;margin:0 auto;padding:0 auto;text-align:center;font-size:16px;font-weight:bold;color:#fff;">` +
      //                 params.data.name +
      //                 `</div><div style="width:100%;margin:0 auto;padding:0 auto;margin-top:20px;display:flex;justify-content:space-between;align-items:center ;">`+str+`</div></div></div></div>`;

      //             return res;
      //         },
      //     },
      //     series: [{
      //         type: "map3D",
      //         zoom: 2,

      //         top: '1%',
      //         selectedMode: "single", //地图高亮单选
      //         regionHeight: 35, //地图高度
      //         map: map.ename,
      //         viewControl: {
      //             center: [-10, 0, 0],
      //             distance: 185, //地图视角 控制初始大小
      //             autoRotate: false,
      //             rotateSensitivity: 0,
      //             alpha: 72, //视角绕 x 轴，即上下旋转的角度
      //             // rotateSensitivity: [1, 1],
      //             animation: true,
      //             zoomSensitivity: false, //是否开启缩放和平移/鼠标滑动缩放禁止
      //         },
      //         //  zoomSensitivity: false,//是否开启缩放和平移/鼠标滑动缩放禁止
      //         label: {
      //             show: true, //是否显示市
      //             textStyle: {
      //                 color: "#fff", //文字颜色
      //                 fontSize: 12, //文字大小
      //                 // backgroundColor: "rgba(0,0,0,0)",
      //             },
      //             formatter: function (param) {
      //                 var str = '   ' + param.data.littitle + "\n" + param.data.namea;
      //                 // var str = param.data.namea;
      //                 // console.log(param)
      //                 return str;
      //             },
      //         },
      //         itemStyle: {
      //             // areaColor: 'red',
      //             color: "#2B5890", //地图颜色
      //             borderWidth: 2, //分界线wdith
      //             borderColor: "#000", //分界线颜色
      //         },

      //         data: this.regionsdata,
      //     }, ],
      // };

      let myChart = this.$echarts.init(document.getElementById(id));
      myChart.showLoading();
      this.$echarts.registerMap(map.ename, map.ename);
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        tools.loopShowTooltip(myChart, option, {
          loopSeries: true,
        }); //自动轮播主要看这段话

        myChart.resize();
        myChart.hideLoading();
      });
      //地图下钻点击事件
      myChart.on("mousemove", (param) => {
        let names = param.name;
        this.$nextTick(() => {
          // this.mapbar("mapbar", param.data);
        });
      });
      //mapbar
    },

    showArea(param) {
      this.$echarts.registerMap(param.ename, param.ename);
      alert(param.name);
      this.rawLine(param); //重新绘画地图
    },

    initMapInfo(id) {
      var that = this;
      // 地图数据
      var chinaGeoCoordMap = {
        黑龙江: [127.9688, 45.368],
        内蒙古: [110.3467, 41.4899],
        吉林: [125.8154, 44.2584],
        北京市: [116.4551, 40.2539],
        辽宁: [123.1238, 42.1216],
        河北: [114.4995, 38.1006],
        天津: [117.4219, 39.4189],
        山西: [112.3352, 37.9413],
        陕西: [109.1162, 34.2004],
        甘肃: [103.5901, 36.3043],
        宁夏: [106.3586, 38.1775],
        青海: [101.4038, 36.8207],
        新疆: [87.9236, 43.5883],
        西藏: [91.11, 29.97],
        四川: [103.9526, 30.7617],
        重庆: [108.384366, 30.439702],
        山东: [117.1582, 36.8701],
        河南: [113.4668, 34.6234],
        江苏: [118.8062, 31.9208],
        安徽: [117.29, 32.0581],
        湖北: [114.3896, 30.6628],
        浙江: [119.5313, 29.8773],
        福建: [119.4543, 25.9222],
        江西: [116.0046, 28.6633],
        湖南: [113.0823, 28.2568],
        贵州: [106.6992, 26.7682],
        云南: [102.9199, 25.4663],
        广东: [113.12244, 23.009505],
        广西: [108.479, 23.1152],
        海南: [110.3893, 19.8516],
        上海: [121.4648, 31.2891],
      };
      // 飞线点数据
      var chinaDatas = [
        [
          {
            name: "黑龙江",
            value: 0,
          },
        ],
        [
          {
            name: "内蒙古",
            value: 0,
          },
        ],
        [
          {
            name: "吉林",
            value: 0,
          },
        ],
        [
          {
            name: "辽宁",
            value: 0,
          },
        ],
        [
          {
            name: "河北",
            value: 0,
          },
        ],
        [
          {
            name: "天津",
            value: 0,
          },
        ],
        [
          {
            name: "山西",
            value: 0,
          },
        ],
        [
          {
            name: "陕西",
            value: 0,
          },
        ],
        [
          {
            name: "甘肃",
            value: 0,
          },
        ],
        [
          {
            name: "宁夏",
            value: 0,
          },
        ],
        [
          {
            name: "青海",
            value: 0,
          },
        ],
        [
          {
            name: "新疆",
            value: 0,
          },
        ],
        [
          {
            name: "西藏",
            value: 0,
          },
        ],
        [
          {
            name: "四川",
            value: 0,
          },
        ],
        [
          {
            name: "山东",
            value: 0,
          },
        ],
        [
          {
            name: "河南",
            value: 0,
          },
        ],
        [
          {
            name: "江苏",
            value: 0,
          },
        ],
        [
          {
            name: "安徽",
            value: 0,
          },
        ],
        [
          {
            name: "湖北",
            value: 0,
          },
        ],
        [
          {
            name: "浙江",
            value: 0,
          },
        ],
        [
          {
            name: "福建",
            value: 0,
          },
        ],
        [
          {
            name: "江西",
            value: 0,
          },
        ],
        [
          {
            name: "湖南",
            value: 0,
          },
        ],
        [
          {
            name: "贵州",
            value: 0,
          },
        ],
        [
          {
            name: "广西",
            value: 0,
          },
        ],
        [
          {
            name: "海南",
            value: 0,
          },
        ],
        [
          {
            name: "上海",
            value: 1,
          },
        ],
      ];
      let formdata = "安徽";
      if (that.mapindex == 2) {
        var convertData = function (data) {
          var res = [];
          for (var i = 0; i < data.length; i++) {
            var dataItem = data[i];
            var fromCoord = chinaGeoCoordMap[dataItem[0].name];
            var toCoord = [117.29, 32.0581];
            // var toCoord = [108.384366, 30.439702]; //中心点地理坐标
            if (fromCoord && toCoord) {
              res.push([
                {
                  // 飞线从哪里出发
                  coord: toCoord,
                },
                {
                  // 飞线去往哪里
                  coord: fromCoord,
                  value: dataItem[0].value,
                },
              ]);
            }
          }
          return res;
        };
      } else if (that.mapindex == 3) {
        var convertData = function (data) {
          var res = [];
          for (var i = 0; i < data.length; i++) {
            console.log(data[i]);
            var dataItem = data[i];
            var fromCoord = chinaGeoCoordMap[dataItem[0].name];
            var toCoord = [117.29, 32.0581];
            // var toCoord = [108.384366, 30.439702]; //中心点地理坐标
            if (fromCoord && toCoord) {
              res.push([
                // {
                //   // 飞线从哪里出发
                //   coord: toCoord,
                // },
                // {
                //   // 飞线去往哪里
                //   coord: fromCoord,
                //   value: dataItem[0].value,
                // },
                {
                  // 飞线从哪里出发

                  // 飞线去往哪里
                  coord: fromCoord,
                  value: dataItem[0].value,
                },
                {
                  // 飞线去往哪里
                  coord: toCoord,
                },
              ]);
            }
          }
          return res;
        };
      }

      var series = [];

      [[formdata, chinaDatas]].forEach(function (item, i) {
        // console.log(item);
        series.push(
          {
            type: "lines",
            coordinateSystem: "geo",
            zlevel: 2,
            effect: {
              show: true,
              period: 4, //箭头指向速度，值越小速度越快
              trailLength: 0, //特效尾迹长度[0,1]值越大，尾迹越长重
              symbol: "arrow", //箭头图标
              symbolSize: 8, //图标大小
              color: "#2BC8FF", // 图标颜色
            },
            lineStyle: {
              normal: {
                show: true,
                width: 2, //尾迹线条宽度
                opacity: 1, //尾迹线条透明度
                curveness: 0.3, //尾迹线条曲直度
                color: "#2BC8FF", // 飞线颜色
              },
              color: "#2BC8FF",
            },
            data: convertData(item[1]),
          },
          {
            type: "effectScatter",
            coordinateSystem: "geo",
            zlevel: 2,
            rippleEffect: {
              //涟漪特效
              period: 4, //动画时间，值越小速度越快
              brushType: "stroke", //波纹绘制方式 stroke, fill
              scale: 4, //波纹圆环最大限制，值越大波纹越大
              color: "#2BC8FF",
            },
            label: {
              normal: {
                show: false,
                position: "right", //显示位置
                offset: [10, 0], //偏移设置
                formatter: function (params) {
                  //圆环显示文字
                  return params.data.name;
                },
                fontSize: 12,
              },
              emphasis: {
                show: false,
              },
            },
            symbol: "circle",
            symbolSize: function (val) {
              return 10; //圆环大小
            },
            itemStyle: {
              normal: {
                show: false,
                color: "#2BC8FF",
              },
            },
            data: item[1].map(function (dataItem) {
              return {
                //在这里定义你所要展示的数据
                // name: dataItem[0].name,
                // value: chinaGeoCoordMap[dataItem[0].name].concat([dataItem[0].value]),
                name: dataItem[0].name,
                value: chinaGeoCoordMap[dataItem[0].name].concat([
                  dataItem[0].value,
                ]),
              };
            }),
          },
          //中心点
          {
            type: "effectScatter",
            coordinateSystem: "geo",
            zlevel: 15,
            rippleEffect: {
              period: 4,
              brushType: "stroke",
              scale: 4,
              color: "#2BC8FF",
            },
            label: {
              normal: {
                show: true,
                position: "right",
                //offset:[5, 0],
                color: "#2BC8FF",
                formatter: "{b}",
                textStyle: {
                  color: "#2BC8FF",
                },
              },
              emphasis: {
                show: false,
                color: "#2BC8FF",
              },
            },
            symbol: "circle",
            symbolSize: 5,
            itemStyle: {
              color: "#2BC8FF",
            },
            data: [
              {
                name: item[0],
                value: chinaGeoCoordMap[item[0]].concat([10]),
              },
            ],
          }
        );
      });

      let myChart = this.$echarts.init(document.getElementById(id));

      let option = {
        // bgColor: '#1a1e45',

        tooltip: {
          trigger: "item",
        },

        geo: {
          map: "china",
          zoom: 0.85,
          left: "13%",
          top: "15%",
          label: {
            normal: {
              show: true,
              textStyle: {
                color: "#FFFFFF",
              },
            },
            emphasis: {
              show: false,
            },
          },
          roam: false, //是否允许缩放
          itemStyle: {
            normal: {
              areaColor: {
                type: "linear-gradient",
                x: 0,
                y: 600,
                x2: 0,
                y2: 60,
                colorStops: [
                  {
                    offset: 0,
                    color: "#003ecb", // 0% 处的颜色
                  },
                  {
                    offset: 1,
                    color: "#2bc8ff",
                  },
                ],
                global: true, // 缺省为 false
              },
              //地图背景色
              borderColor: "rgba(255,255,255,0.5)", //省市边界线00fcff 516a89
              borderWidth: 1,
              textStyle: "#fff",
              shadowColor: "rgba(58,115,192,0.5)",
              shadowOffsetX: 5,
              shadowOffsetY: 5,
            },
            emphasis: {
              color: "#22ccfb", //悬浮背景
            },
          },
          data: [],
        },
        series: series,
      };
      myChart.showLoading();
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        myChart.resize();
        myChart.hideLoading();
      });
      //  myChart.setOption(option)
    },
    //客户盈利
    khylfun(id) {
      var that = this;
      let myChart = this.$echarts.init(document.getElementById(id));
      // let DataName = ["销售额", "毛利额"];
      let DataName = ["毛利额"];
      let DataTime = [
        "1月",
        "2月",
        "3月",
        "4月",
        "5月",
        "6月",
        "7月",
        "8月",
        "9月",
      ];
      let mlData = [4652, 5685, 7011, 8333, 9549, 8305, 11424, 9994, 10814];
      let xseData = [1368, 1706, 2103, 2500, 2894, 2491, 3427, 2998, 3244];
      DataTime = [];
      mlData = [];
      xseData = [];
      that.custProft.forEach((item) => {
        DataTime.push(item.month + "月");
        mlData.push(item.gross_profit);
        // xseData.push(item.proft_amt);
      });
      console.log("mlData", mlData);
      let option = {
        tooltip: {
          show: true,
          trigger: "axis",
          formatter: function (params, ticket) {
            // console.log(params);
            let str = `${params[0].name}
            <br>${params[0].seriesName}（万元）：${params[0].value}`;
            return str;
          },
          axisPointer: {
            type: "cross",
            crossStyle: {
              color: "#666",
            },
          },
        },
        legend: {
          data: DataName,
          icon: "circle",
          right: 10,
          top: 1,
          textStyle: {
            fontSize: "12",
            color: "rgba(255,255,255,0.7)",
          },
        },
        grid: {
          left: "10%",
          right: "10%",
          bottom: "8%",
          top: "15%",
          containLabel: true,
        },
        xAxis: [
          {
            type: "category",
            data: DataTime,
            axisPointer: {
              type: "shadow",
            },
            // boundaryGap: false, //让x轴坐标从紧挨着y轴开始
            // 坐标轴线
            axisLine: {
              show: false,
              lineStyle: {
                color: "rgba(255,255,255,0.7)", //X轴字体颜色
                fontSize: "12",
              },
            },
            axisTick: {
              show: false, //去掉图表横纵坐标轴刻度线
            },
          },
        ],
        yAxis: [
          {
            type: "value",
            name: "单位:万元",
            nameTextStyle: {
              color: "rgba(255, 255, 255, 0.5)",
              fontSize: 12,
            },

            /*  min: 0,
            max: 200, */
            // interval: 50,
            axisLabel: {
              formatter: "{value}",
              textStyle: {
                color: "rgba(255,255,255,0.7)", //Y轴内容文字颜色
              },
            },
            axisLine: {
              show: true,
              lineStyle: {
                color: "rgba(66, 164, 255, 0.3)", //y轴
                type: "solid",
                // fontSize: '12',
              },
            },
            splitLine: {
              show: true,
              lineStyle: {
                type: "solid",
                color: "rgba(66, 164, 255, 0.3)", //里面横着的虚线
              },
            },
          },
        ],
        series: [
          {
            name: DataName[0],
            type: "line",
            data: mlData,
            barWidth: "12",
            // seriesLayoutBy: 'row',
            itemStyle: {
              // barBorderRadius: [30, 30, 0, 0],
              color: {
                x: 0,
                y: 0,
                x2: 1,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(49, 170, 204)",
                  }, //第一顶部颜色
                  {
                    offset: 1,
                    color: "rgba(49, 170, 204)",
                  }, //第一底部颜色
                ],
              },
            },
            areaStyle: {
              // 折现下是否填充
              color: {
                type: "linear",
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(49, 170, 204)", // 0% 处的颜色
                  },
                  {
                    offset: 1,
                    color: "rgba(0,0,0,0.1)", // 100% 处的颜色
                  },
                ],
                global: false,
              },
            },
          },
          /*    {
            name: DataName[1],
            type: "bar",
            data: xseData,
            barWidth: "12",
            //seriesLayoutBy: 'row',
            itemStyle: {
              barBorderRadius: [30, 30, 0, 0],
              color: {
                x: 0,
                y: 0,
                x2: 1,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: "rgba(194, 170, 50, 1)",
                  }, //第二顶部颜色
                  {
                    offset: 1,
                    color: "rgba(128, 131, 73, 1)",
                  }, //第二底部颜色
                ],
              },
            },
          }, */
        ],
      };
      myChart.showLoading();
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        myChart.resize();
        myChart.hideLoading();
      });
    },
    //南丁格尔a
    Nightingalea(id) {
      var that = this;
      let myChart = this.$echarts.init(document.getElementById(id));
      that.NightingaleaTot = that.NightingaleaData.reduce(
        (pre, cur) => pre + cur.value,
        0
      );
      let colorList = [
        "#cb455e",
        "#0158e9",
        "#d3b931",
        "#04c375",
        "#C36004",
        "#4951FF",
        "#42C7DE",
        "#168D6F",
        "#15ABFF",
      ];
      let option = {
        title: [
          {
            show: true,
            // todo
            text: that.NightingaleaTot,
            subtext: "(起)",
            textStyle: {
              fontSize: 14,
              color: "rgba(52, 239, 254, 1)",
              fontWeight: "normal",
            },
            subtextStyle: {
              fontSize: 12,
              color: "#fff",
              // fontWeight: "bold",
            },
            textAlign: "center",
            x: "24%",
            y: "32%",
          },
        ],
        tooltip: {
          trigger: "item",
          // formatter: "{b}: {c} ({d}%)",
          formatter: "{b}: {d}%",
        },
        legend: {
          orient: "vertical",
          //   bottom: "-15%",
          top: "10%",
          left: "50%",
          textStyle: {
            fontSize: 12,
            color: "#fff",
            rich: {
              one: {
                color: "#34EFFE",
                fontWeight: 600,
              },
            },
          },
          formatter: function (name) {
            let percent = 0;
            let total = 0;
            for (let i = 0; i < that.NightingaleaData.length; i++) {
              total += that.NightingaleaData[i].value;
            }
            const item = that.NightingaleaData.filter(
              (item) => item.name === name
            )[0];
            percent = ((item.value / total) * 100).toFixed(1);
            let num = 0;
            for (var i = 0; i < that.NightingaleaData.length; i++) {
              if (name == that.NightingaleaData[i].name) {
                num = that.NightingaleaData[i].value;
              }
            }
            //return `${name}：${percent}%`;
            return `${name} {one|${num}}`;
          },
        },
        series: [
          {
            type: "pie",
            center: ["25%", "50%"],
            radius: ["50%", "80%"],
            avoidLabelOverlap: false,
            // roseType: "radius",
            label: {
              show: false,
              position: "center",
            },
            itemStyle: {
              normal: {
                color: function (params) {
                  return colorList[params.dataIndex];
                },
              },
            },
            labelLine: {
              show: false,
            },
            data: that.NightingaleaData,
          },
        ],
      };
      // myChart.showLoading();
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        myChart.off("legendselectchanged");
        myChart.on("legendselectchanged", function (obj) {
          console.log(obj);
          // console.log(obj,'0bj=======================');
          // let selected = obj.selected;
          // let name = obj.name;
          let selectArr = [];
          for (const key in obj.selected) {
            if (obj.selected[key]) {
              selectArr.push(key);
            }
          }
          // console.log(selectArr,'=============');
          let result = 0;
          selectArr.forEach((k) => {
            that.NightingaleaData.forEach((cur) => {
              if (k === cur.name) {
                result += cur.value;
              }
            });
          });
          that.NightingaleaTot = result;
          option.title[0].text = that.NightingaleaTot;
          myChart.setOption(option, false);
          console.log(option);
          // console.log(that.NightingaleaTot,'=========222======');
          // myChart.setOption(option,true);
        });
        myChart.getZr().on("mouseover", (event) => {
          const legendDataIndex = event.topTarget.parent.__legendDataIndex; // 每个legend的index
          // console.log(legendDataIndex,'=====================');
          that.$emit("retailerIntro", legendDataIndex);
        });
        myChart.getZr().on("mouseout", (event) => {
          that.$emit("retailerIntroHide");
        });
        myChart.resize();
        myChart.hideLoading();
      });
    },
    Nightingaleb(id) {
      var that = this;
      let myChart = this.$echarts.init(document.getElementById(id));
      that.NightingalebTot = that.NightingalebData.reduce(
        (pre, cur) => pre + cur.value,
        0
      );
      let colorList = [
        "#cb455e",
        "#0158e9",
        "#d3b931",
        "#04c375",
        "#C36004",
        "#4951FF",
        "#42C7DE",
        "#168D6F",
        "#15ABFF",
      ];
      let option = {
        title: [
          {
            show: true,
            text: that.NightingalebTot,
            subtext: "(起)",
            textStyle: {
              fontSize: 14,
              color: "rgba(52, 239, 254, 1)",
              fontWeight: "normal",
            },
            subtextStyle: {
              fontSize: 12,
              color: "#fff",
              // fontWeight: "bold",
            },
            textAlign: "center",
            x: "24%",
            y: "32%",
          },
        ],
        tooltip: {
          trigger: "item",
          // formatter: "{b}: {c} ({d}%)",
          formatter: "{b}: {d}%",
        },
        legend: {
          orient: "vertical",
          top: "10%",
          left: "50%",
          textStyle: {
            overflow: "break",
            fontSize: 12,
            // width: 130,
            color: "#fff",
            rich: {
              one: {
                color: "#34EFFE",
                fontWeight: 600,
              },
            },
          },
          formatter: function (name) {
            let percent = 0;
            let total = 0;
            for (let i = 0; i < that.NightingalebData.length; i++) {
              total += that.NightingalebData[i].value;
            }
            const item = that.NightingalebData.filter(
              (item) => item.name === name
            )[0];
            percent = ((item.value / total) * 100).toFixed(1);
            //return `${name}：${percent}%`;
            let num = 0;
            for (var i = 0; i < that.NightingalebData.length; i++) {
              if (name == that.NightingalebData[i].name) {
                num = that.NightingalebData[i].value;
              }
            }
            return `${name} {one|${num}}`;
          },
        },
        series: [
          {
            type: "pie",
            center: ["25%", "50%"],
            radius: ["50%", "80%"],
            avoidLabelOverlap: false,
            // roseType: "radius",
            label: {
              show: false,
              position: "center",
            },
            itemStyle: {
              normal: {
                color: function (params) {
                  return colorList[params.dataIndex];
                },
              },
            },
            labelLine: {
              show: false,
            },
            data: that.NightingalebData,
          },
        ],
      };
      myChart.showLoading();
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        myChart.resize();
        myChart.hideLoading();

        myChart.off("legendselectchanged");
        myChart.on("legendselectchanged", function (obj) {
          console.log(obj);
          // console.log(obj,'0bj=======================');
          // let selected = obj.selected;
          // let name = obj.name;
          let selectArr = [];
          for (const key in obj.selected) {
            if (obj.selected[key]) {
              selectArr.push(key);
            }
          }
          // console.log(selectArr,'=============');
          let result = 0;
          selectArr.forEach((k) => {
            that.NightingalebData.forEach((cur) => {
              if (k === cur.name) {
                result += cur.value;
              }
            });
          });
          that.NightingalebTot = result;
          option.title[0].text = that.NightingalebTot;
          myChart.setOption(option, false);
          // console.log(option);
          // console.log(that.NightingalebTot,'=========222======');
          // myChart.setOption(option,true);
        });
        myChart.getZr().on("mouseover", (event) => {
          const legendDataIndex = event.topTarget.parent.__legendDataIndex; // 每个legend的index
          // console.log(legendDataIndex,'=====================');
          that.$emit("retailerIntro", legendDataIndex);
        });
        myChart.getZr().on("mouseout", (event) => {
          that.$emit("retailerIntroHide");
        });
      });
    },
    //
    barbotfun(id) {
      let myChart = this.$echarts.init(document.getElementById(id));
      let totalCost = [5500, 5500, 5500]; //背景色比例
      let visits = [1900, 1850, 1800]; //数值
      let grade = ["拘留人数", "逮捕人数", "判刑人数"];
      let data = {
        grade: grade,
        totalCost: totalCost,
        visits: visits,
      };
      let option = {
        grid: {
          top: "5",
          left: "-9%",
          right: "3%",
          bottom: "0%",
          containLabel: true,
        },
        tooltip: {
          show: false,
        },
        xAxis: {
          show: false,
        },
        yAxis: [
          {
            type: "category",

            axisTick: {
              show: false,
            },
            axisLine: {
              show: false,
            },
            axisLabel: {
              margin: 70,
              textStyle: {
                align: "left",
                fontSize: 14,
                color: "rgba(255,255,255,0.7)",
              },
            },
            data: data.grade,
            inverse: true,
          },
          {
            type: "category",

            axisLine: {
              show: false,
            },
            axisTick: {
              show: false,
            },
            axisLabel: {
              formatter: "{value}" + "人",
              textStyle: {
                fontSize: 12,
                color: "#42c7de",
              },
            },
            splitArea: {
              show: false,
            },
            splitLine: {
              show: false,
            },
            data: data.visits,
            inverse: true,
          },
        ],
        series: [
          {
            type: "bar",
            yAxisIndex: 1,
            itemStyle: {
              normal: {
                show: true,
                color: "rgb(15, 87, 151)",
                // barBorderRadius: 2,
                borderWidth: 0,
                borderColor: "#333",
              },
            },
            barWidth: "40%",

            data: data.totalCost,
          },
          {
            type: "bar",

            itemStyle: {
              normal: {
                show: true,
                color: this.$echarts.graphic.LinearGradient(0, 0, 1, 0, [
                  {
                    offset: 0,
                    color: "rgba(16, 73, 137, 1)",
                  },
                  {
                    offset: 1,
                    color: "rgba(64, 195, 219, 1)",
                  },
                ]),
                // barBorderRadius: 2,
                borderWidth: 0,
                borderColor: "#333",
              },
            },
            label: {
              normal: {
                show: false,
              },
            },
            barWidth: "40%",

            data: data.visits,
          },
        ],
      };
      myChart.showLoading();
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        myChart.resize();
        myChart.hideLoading();
      });
    },
    //分拣配送
    fjps(id) {
      let myChart = this.$echarts.init(document.getElementById(id));
      let myColor = ["#42c7de", "#d3b931", "#cb455e"];
      let namelist = ["配送次数", "配送数量", "配送费用"];
      let numList = [8, 133, 2.2];
      let numListUnit = ["次", "盒", "万元"];
      let wenduTextStyle = {
        rich: {
          white: {
            color: "rgba(255,255,255,0.7)",
            fontSize: 12,
          },
          smallwhite: {
            color: "rgba(255,255,255,0.7)",
            fontSize: 12,
          },
        },
      };
      let value = [0.62, 0.32, 0.78];
      let arr = [0.62, 0.32, 0.78];
      let option = {
        grid: [
          {
            top: "30",
            left: "-5%",
            right: "30%",
            bottom: "-30",
            containLabel: true,
          },
        ],

        xAxis: [
          {
            show: false,
          },
        ],
        yAxis: [
          {
            show: false,
            data: namelist,
            inverse: true,
            splitLine: {
              show: false,
            },
            axisTick: {
              show: false,
            },
            axisLine: {
              show: false,
            },
            axisLabel: {
              color: "#fff",
              fontSize: 18,
            },
          },
          {
            type: "category",
            axisTick: { show: false }, // 不显示刻度线
            axisLabel: {
              color: "#000",
            },
            axisLine: {
              show: false,
            },
            inverse: true,
          },
        ],
        series: [
          {
            name: "条",
            // type: "bar",
            // symbol: "rect", // 长方形
            // symbolRepeat: "fixed",
            // symbolMargin: "2", // 缝隙
            // symbolClip: true,
            // symbolSize: ["3", "12"],
            // barCategoryGap: 5,
            // yAxisIndex: 0,
            // animationDuration: 2000,
            data: [
              {
                value: value[0],
                itemStyle: {
                  normal: {
                    borderWidth: 0,
                    color: {
                      type: "linear",
                      x: 0,
                      y: 0,
                      x2: 1,
                      y2: 0,
                      colorStops: [
                        {
                          offset: 0,
                          color: "#103270",
                        },
                        {
                          offset: 0.4,
                          color: "#42c7de",
                        },
                      ],
                    },
                  },
                },
              },
              {
                value: value[1],
                itemStyle: {
                  normal: {
                    borderWidth: 0,
                    color: {
                      type: "linear",
                      x: 0,
                      y: 0,
                      x2: 1,
                      y2: 0,
                      colorStops: [
                        {
                          offset: 0,
                          color: "#103270",
                        },
                        {
                          offset: 0.4,
                          color: "#d3b931",
                        },
                      ],
                    },
                  },
                },
              },
              {
                value: value[2],
                itemStyle: {
                  normal: {
                    borderWidth: 0,
                    color: {
                      type: "linear",
                      x: 0,
                      y: 0,
                      x2: 1,
                      y2: 0,
                      colorStops: [
                        {
                          offset: 0,
                          color: "#103270",
                        },
                        {
                          offset: 0.4,
                          color: "#cb455e",
                        },
                      ],
                    },
                  },
                },
              },
            ],
            type: "bar",
            barWidth: 12,
            animationDuration: 2000,
            label: {
              show: true,
              position: [5, -20],
              fontSize: 16,
              color: "#fff",
              formatter: (name) => namelist[name.dataIndex],
            },
            itemStyle: {
              normal: {
                borderWidth: 0,
                color: {
                  type: "linear",
                  x: 0,
                  y: 0,
                  x2: 1,
                  y2: 0,
                  colorStops: [
                    {
                      offset: 0,
                      color: "#103270",
                    },
                    {
                      offset: 1,
                      color: "#103270",
                    },
                  ],
                },
              },
            },
            zlevel: 0,
          },
          {
            name: "白框",
            type: "bar",
            // yAxisIndex: 1,
            left: "50",
            // barCategoryGap: 5,
            barGap: "-100%",
            color: "#113a7a", // 柱条颜色
            data: [1, 1, 1],
            barWidth: 12,
            itemStyle: {
              normal: {
                color: "#113a7a",
                // barBorderRadius: 5,
              },
            },
            label: {
              normal: {
                show: true, // 是否显示进度条上方的百分比
                formatter: (series) => {
                  return (
                    numList[series.dataIndex] + numListUnit[series.dataIndex]
                  );
                },
                position: [500, -25],
                textStyle: {
                  color: "rgb(66, 199, 222)", // 进度条上方百分比字体颜色
                  fontSize: 20,
                  fontweight: 600,
                },
              },
            },
            z: 1,
          },
          {
            //辅助分割图形
            type: "pictorialBar",
            barWidth: 12,
            symbol: "rect",
            // symbolRotate:"-20",
            // symbolMargin: "100%", //控制分割图形的大小
            // symbolSize: [4, "100%"],
            // symbolOffset: [-0.5, 0],
            // symbolRepeat: true,
            symbolRepeat: "fixed",
            symbolMargin: "2", // 缝隙
            symbolClip: true,
            symbolSize: ["3", "12"],
            barCategoryGap: 5,
            animation: false,
            itemStyle: {
              normal: {
                color: "#113a79",
                borderWidth: 0,
              },
            },
            data: arr,
            z: 3,
          },
        ],
      };
      myChart.showLoading();
      this.$nextTick(() => {
        // 初始化地图
        myChart.setOption(option, false);
        myChart.resize();
        myChart.hideLoading();
      });
    },
    //zyflowulrightbar
    divcolorswitch(data) {
      // 二级
      if (data.rank == "一级") {
        return "redcolor";
      } else if (data.rank == "二级") {
        return "yellowcolor";
      } else if (data.rank == "三级") {
        return "bluecolor";
      } else if (data.rank == "四级") {
        return "greencolor";
      }
      //       // 红色一级，黄色二级，蓝色三级，绿色四级
    },
    getNowDate() {
      const timeOne = new Date();
      const year = timeOne.getFullYear();
      let month = timeOne.getMonth() + 1;
      let day = timeOne.getDate();
      day = day < 10 ? "0" + day : day;
      const time = `${year}-${month}-${day}`;
      return time;
    },
    getTime() {
      const date = new Date();
      const year = date.getFullYear();
      const month = date.getMonth() + 1;
      const day = date.getDate();
      const hour = date.getHours();
      const minute = date.getMinutes();
      const second = date.getSeconds();
      // const str = ''
      // if (this.hour > 12) {
      //     this.hour -= 12;
      //     this.str = " AM";
      // } else {
      //     this.str = " PM";
      // }
      this.month = check(month);
      this.day = check(day);
      this.hour = check(hour);
      this.minute = check(minute);
      this.second = check(second);

      function check(i) {
        const num = i < 10 ? "0" + i : i;
        return num;
      }

      //  this.nowDate = year + "年" + this.month + "月" + this.day + "日";
      this.nowTime =
        year +
        "年" +
        this.month +
        "月" +
        this.day +
        "日 " +
        this.hour +
        ":" +
        this.minute +
        ":" +
        this.second;
    },
    barInit(id,XData,YData,unit) {
      console.log('----',id,'----');
      var that = this;

      this.$nextTick(() => {
        let myChart = that.$echarts.init(document.getElementById(id));
        // let DataName = [];
        // let xData = ["2023年上半年"];
        // let yTitle = {
        //   "jsy-box": "人均查获量（万支/人）",
        //   "yj-box": "烟机查获量(台)",
        //   "yyys-box": "烟丝烟叶查获量(吨)",
        // };
        // let data1 = [];
        // let data2 = [];
        // let data3 = [];
        // let data4 = [];
        // let data5 = [];
        // let data6 = [];
        // let maxVal = 10;
        // let minVal = 0;
        // let XData = ['全国','安徽','江苏','上海','浙江','湖北'];
        // let XData = XData;
        // let YData = [87,132,107,158,115,56];
        // let YData = YData ;
        let barWidth = "18";
        // let yAxisName = "人均查获量(万支/人)";
        let yAxisName = '单位：'+unit;
        // if (id === "jsy-box") {
        //   if (that.titleMap.level === 1) {
        //     that.caseBmk.fakePerQty.data.forEach((item) => {
        //       XData.push(item?.org_name);
        //       YData.push(item?.fake_per_qty);
        //     });
        //   } else if (that.titleMap.level === 2) {
        //     that.caseBmk.avgPersonFakeNumCity.data.forEach((item) => {
        //       XData.push(item?.city_org_name);
        //       YData.push(item?.num);
        //     });
        //   } else if (that.titleMap.level === 3) {
        //     that.caseBmk.avgPersonFakeNumCounty.data.forEach((item) => {
        //       XData.push(
        //         item?.COUNTY_ORG_NAME.replace("烟草专卖局", "")
        //           .replace("合肥市", "")
        //           .replace("淮南市", "")
        //           .replace("亳州市", "")
        //           .replace("黄山市", "")
        //           .replace("芜湖市", "")
        //           .replace("安徽省", "")
        //           .replace("分局", "区")
        //       );
        //       YData.push(item?.num);
        //     });
        //   }

        //   yAxisName = "人均查获量(万支/人)";
        //   // data1 = [that.caseBmk.fakePerQty.data[0]?.fake_per_qty];
        //   // data2 = [that.caseBmk.fakePerQty.data[1]?.fake_per_qty];
        //   // data3 = [that.caseBmk.fakePerQty.data[2]?.fake_per_qty];
        //   // data4 = [that.caseBmk.fakePerQty.data[3]?.fake_per_qty];
        //   // data5 = [that.caseBmk.fakePerQty.data[4]?.fake_per_qty];
        //   // data6 = [that.caseBmk.fakePerQty.data[5]?.fake_per_qty];
        //   // maxVal = that.caseBmk.fakePerQty.data.sort(
        //   //   (a, b) => a.fake_per_qty - b.fake_per_qty
        //   // )[0].fake_per_qty;
        //   // minVal = that.caseBmk.fakePerQty.data.sort(
        //   //   (a, b) => a.fake_per_qty - b.fake_per_qty
        //   // )[that.caseBmk.fakePerQty.data.length - 1].fake_per_qty;
        // } else if (id === "yj-box") {
        //   that.caseBmk.machQty.data.forEach((item) => {
        //     XData.push(item?.org_name);
        //     YData.push(item?.mach_qty);
        //   });
        //   yAxisName = "烟机查获量(台)";
        //   // data1 = [that.caseBmk.machQty.data[0]?.mach_qty];
        //   // data2 = [that.caseBmk.machQty.data[1]?.mach_qty];
        //   // data3 = [that.caseBmk.machQty.data[2]?.mach_qty];
        //   // data4 = [that.caseBmk.machQty.data[3]?.mach_qty];
        //   // data5 = [that.caseBmk.machQty.data[4]?.mach_qty];
        //   // data6 = [that.caseBmk.machQty.data[5]?.mach_qty];
        //   // maxVal = that.caseBmk.machQty.data.sort(
        //   //   (a, b) => a.mach_qty - b.mach_qty
        //   // )[0].mach_qty;
        //   // minVal = that.caseBmk.machQty.data.sort(
        //   //   (a, b) => a.mach_qty - b.mach_qty
        //   // )[that.caseBmk.machQty.data.length - 1].mach_qty;
        // } else if (id === "yyys-box") {
          
        //   if (that.titleMap.level === 1) {
        //     that.caseBmk.leafCutQty.data.forEach((item) => {
        //       XData.push(item?.org_name);
        //       YData.push(item?.leaf_cut_qty);
        //     });
        //   } else if (that.titleMap.level === 2) {
        //     that.caseBmk1.tobaccoLeafCityData.data.forEach((item) => {
        //       XData.push(item?.city_org_name);
        //       YData.push(item?.qty);
        //     });
        //   } else if (that.titleMap.level === 3) {
        //     that.caseBmk1.tobaccoLeafCountyData.data.forEach((item) => {
        //       XData.push(item?.county_org_name.replace("烟草专卖局", "")
        //                   .replace("合肥市", "")
        //                   .replace("淮南市", "")
        //                   .replace("亳州市", "")
        //                   .replace("黄山市", "")
        //                   .replace("芜湖市", "")
        //                   .replace("安徽省", "")
        //                   .replace("分局", "区"));
        //       YData.push(item?.qty);
        //     });
        //   }


          
        //   yAxisName = "烟叶烟丝查获量(吨)";
         
        // }
        // barWidth = (200 / XData.length).toFixed(0);
        let option = {
          tooltip: {
            show: true,
            trigger: "axis",
          },
          // tooltip: {
          //   show: false,
          //   trigger: "axis",
          //   axisPointer: {
          //     type: "cross",
          //     crossStyle: {
          //       color: "#666",
          //     },
          //   },
          // },
          grid: {
            left: "5%",
            right: "5%",
            top: "20%",
            bottom: "10%",
            containLabel: true,
          },
          xAxis: [
            {
              type: "category",
              data: XData,
              axisPointer: {
                type: "shadow",
              },
              // boundaryGap: false, //让x轴坐标从紧挨着y轴开始
              axisLabel: {
                formatter: function (value) {
                  // return value.split("").join("\n");
                  return value
                },
              },
              // 坐标轴线
              axisLine: {
                show: false,
                lineStyle: {
                  color: "rgba(255,255,255,0.7)", //X轴字体颜色
                  fontSize: "12",
                },
              },
              axisTick: {
                show: false, //去掉图表横纵坐标轴刻度线
              },
            },
          ],
          yAxis: [
            {
              type: "value",
              name: yAxisName,
              nameTextStyle: {
                color: "rgba(255, 255, 255, 0.5)",
                fontSize: 12,
              },

              // min: 0,
              // max: 40,
              // interval: 50,
              axisLabel: {
                formatter: "{value}",
                textStyle: {
                  color: "rgba(255,255,255,0.7)", //Y轴内容文字颜色
                },
              },
              axisLine: {
                show: true,
                lineStyle: {
                  color: "rgba(66, 164, 255, 0.3)", //y轴
                  type: "solid",
                  // fontSize: '12',
                },
              },
              splitLine: {
                show: true,
                lineStyle: {
                  type: "solid",
                  color: "rgba(66, 164, 255, 0.3)", //里面横着的虚线
                },
              },
            },
          ],
          series: [
            {
              // name: DataName[0],
              type: "bar",
              data: YData,
              barWidth: barWidth,

              // seriesLayoutBy: 'row',
              itemStyle: {
                normal: {
                  // barBorderRadius: [30, 30, 0, 0],
                  label: {
                    show: true, //开启显示
                    position: "top", //在上方显示
                    textStyle: {
                      //数值样式
                      color: "#fff",
                      fontSize: 14,
                    },
                  },
                  color: {
                    x: 0,
                    y: 0,
                    x2: 1,
                    y2: 1,
                    colorStops: [
                      {
                        offset: 0,
                        color: "rgba(61, 185, 210, 1)",
                      }, //第一顶部颜色
                      {
                        offset: 1,
                        color: "rgba(42, 126, 159, 0.8)",
                      }, //第一底部颜色
                    ],
                  },
                },
              },
            },
          ],
        };
        myChart.showLoading();
        // 初始化地图
        myChart.setOption(option, false);
        myChart.resize();
        myChart.hideLoading();
      });
    },
    showCertifiedAccountDetail(){
      if(this.titleMap.level==1){
        this.CertifiedAccountDetail = true
      }
    }
  },
  beforeDestroy() {
    if (this.timer) {
      clearInterval(this.timer); // 在Vue实例销毁前，清除定时器
    }
  },
  loadMore() {},
};
</script>

<style lang="scss" scoped>
@import "../../assets/scss/qjzl.scss";

.lm-top {
  width: 100%;
  height: 40px;
  background-size: 100% 100%;
  margin-bottom: 10px;
}

.qjzlright {
  margin-top: -10px;

  .dzygrightyop {
    // background: url(../../assets/dzygl-new/djjg/bg.png);
    background-size: 100% 100%;
    height: 457px;
    padding: 10px 15px 15px 15px;
    position: relative;
    .main1 {
      display: flex;
      justify-content: center;

      .main1-item {
        display: flex;
        justify-content: center;
        width: 220px;
        height: 40px;
        padding: 0 18px;
        line-height: 40px;
        background: url(../../assets/dzygl-new/djjg/num-bg1.png);
        background-size: 100% 100%;
        // margin-bottom: 5px;
      }
    }

    .main2 {
      margin-bottom: 10px;

      .main2-title {
        margin-top: -20px;
        width: 430px;
        height: 28px;
        background: url(../../assets/dzygl-new/djjg/title2.png);
        background-size: 100% 100%;
      }

      .content {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-evenly;

        .content-item {
          padding: 2px 0;

          display: flex;
          flex-direction: column;
          justify-content: space-evenly;
          align-items: center;
          text-align: center;
          width: 224px;
          // height: 100px;
          // background: url(../../assets/qjzl-new/dzygl/bg.png);
          // background-size: 100% 100%;
          .num {
            .text {
              width: 200px;
              height: 50px;
              line-height: 50px;
              margin: -5px 0;
              text-align: center;
            }
          }

          &:nth-of-type(1) {
            margin-bottom: 5px;
          }

          &:nth-of-type(2) {
            margin-bottom: 5px;
          }
        }
      }
    }
  }
}

.centerbotdiv {
  // background: url(../../assets/dzygl-new/fjps/bg.png);
  background-size: 100% 100%;
}

.xzxk-box {
  width: 100%;

  .main {
    padding: 10px;
    // background: url(../../assets/dzygl-new/xzxk/bg.png);
    background-size: 100% 100%;

    .main1 {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;

      .main1-item {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-content: center;
        text-align: center;
        width: 145px;
        height: 55px;
        background: url(../../assets/dzygl-new/xzxk/num-bg1.png);
        background-size: 100% 100%;
        margin-bottom: 5px;

        .title {
          margin-bottom: 5px;
        }
      }
    }

    .main2 {
      .main2-title {
        margin-top: 10px;
        width: 430px;
        height: 30px;
        background: url(../../assets/dzygl-new/xzxk/jssp.png);
        background-size: 100% 100%;
      }

      .content {
        display: flex;
        justify-content: space-between;
        padding: 10px 24px;

        .main2-item {
          width: 170px;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-content: center;
          text-align: center;

          .num {
            margin-bottom: -10px;
          }

          .title {
            height: 45px;
            line-height: 65px;
            background: url(../../assets/dzygl-new/xzxk/num-bg2.png);
            background-size: 100% 100%;
          }
        }
      }
    }
  }
}

.jygl-box {
  width: 100%;
  margin-top: 10px;

  .main {
    padding: 10px;
    // background: url(../../assets/dzygl-new/xzxk/bg.png);
    background-size: 100% 100%;

    .main1 {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;

      .main1-item {
        display: flex;
        flex-direction: column;
        // justify-content: center;
        align-content: center;
        text-align: center;
        width: 200px;
        height: 50px;
        background: url(../../assets/dzygl-new/xsqk/ppglbj.png);
        // background: url(../../assets/dzygl-new/xsqk/dizuo.png);
        // background: url(../../assets/dzygl-new/jygl/num-bg.png);
        background-size: 100% 100%;

        .title {
          margin-bottom: 5px;
        }
      }

      .main2-item {
        display: flex;
        flex-direction: column;
        // justify-content: center;
        align-content: center;
        text-align: center;
        width: 242px;
        height: 50px;
        // background: url(../../assets/dzygl-new/xsqk/ppglbj.png);
        background: url(../../assets/dzygl-new/xsqk/dizuo.png);
        // background: url(../../assets/dzygl-new/jygl/num-bg.png);
        background-size: 100% 100%;

        .title {
          margin-bottom: 5px;
        }
      }
    }
  }
}

.xsqk-box {
  width: 100%;
  margin-top: 10px;

  .main {
    width: 100%;
    height: 320px;
    padding: 10px;
    // background: url(../../assets/dzygl-new/xsqk/bg.png);
    background-size: 100% 100%;

    .main1 {
      .title {
        display: flex;
        justify-content: space-between;
        padding: 0 20px;
        margin-bottom: 5px;
      }
    }

    .main2 {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      // margin-top: 0px;
      // padding: 0 5px;

      .main1-item {
        // margin-top: 5px;
        display: flex;
        flex-direction: column;
        // justify-content: center;
        align-content: center;
        text-align: center;
        width: 224px;
        height: 50px;
        background: url(../../assets/dzygl-new/xsqk/dizuo.png);
        // background: url(../../assets/dzygl-new/xsqk/num-bg1.png);
        background-size: 100% 100%;

        .title {
          margin-bottom: 5px;
        }
      }
    }

    .main3 {
      margin: 5px 0 10px;
      display: flex;
      justify-content: space-between;

      .main3-item {
        width: 200px;
        height: 30px;
        line-height: 30px;
        // background: url(../../assets/dzygl-new/xsqk/num-bg2.png);
        background-size: 100% 100%;
        text-align: center;
        .num {
          width: 100%;
          background: url(../../assets/dzygl-new/xsqk/num-bg2.png);
          .unit {
            color: white !important;
            font-size: 14 !important;
            font-weight: 600 !important;
          }
        }
      }
    }

    .main4 {
      display: flex;
      justify-content: space-between;

      .main4-item {
        width: 100px;
        height: 50px;
        text-align: center;

        .num {
          margin-bottom: -10px;
        }

        .title {
          height: 38px;
          line-height: 55px;
          background: url(../../assets/dzygl-new/xsqk/num-bg3.png);
          background-size: 100% 100%;
        }
      }
    }
  }
}

.anhuiMap ::v-deep .width100per {
  width: 100%;
  margin: 0 auto;
  padding: 0 auto;
}

.anhuiMap ::v-deep .dflex {
  display: flex;
  flex-wrap: nowrap;
}

.anhuiMap ::v-deep .justifybetween {
  justify-content: space-between;
}

.anhuiMap ::v-deep .alignitem {
  align-items: center;
}

.anhuiMap ::v-deep .aligncon {
  align-content: center;
}

.anhuiMap ::v-deep .lightblue {
  color: rgba(52, 239, 254, 1);
}

.anhuiMap ::v-deep .fontsize21 {
  font-size: 21px !important;
}

.anhuiMap ::v-deep .fontsize14 {
  font-size: 14px !important;
}

.anhuiMap ::v-deep .fontweight {
  font-weight: bold;
}

.anhuiMap ::v-deep .whitecolor {
  color: #fff;
}

.anhuiMap ::v-deep .partflex {
  flex: 1;
}

.anhuiMap ::v-deep .bluebg {
  background: rgba(41, 138, 255, 0.15);
}

.anhuiMap ::v-deep .magtop9dzyg {
  margin-top: 9px;
}

.anhuiMap ::v-deep .magtop4dzyg {
  margin-top: 4px;
}

.anhuiMap ::v-deep .padrounddzyg {
  padding: 11px 12px;
}

.anhuiMap ::v-deep .magbot15dzyg {
  margin-bottom: 10px;
}

.anhuiMap ::v-deep .magright13dzyg {
  margin-right: 13px;
}

.capacity-box {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  // background: url(../../assets/qjzl-new/new/xzxk-bg1.png) no-repeat;
  .ProductionDetailClass {
    z-index: 2;
    position: absolute;
    top: 50px;
    right: -120px;
    width: 320px;
    height: 160px;
    background: url(../../assets/qjzl-new/xzxk/hlrl-pop-bg.png);
    background-size: 100% 100%;
    .capacity-box {
      width: 100%;
      height: 100%;
      padding: 10px;
      .head {
        display: flex;
        width: 100%;
        height: 30px;
        .head-item {
          width: 33%;
          height: 30px;
          text-align: center;
          font-weight: 600;
          line-height: 30px;
        }
      }
      .body {
        width: 100%;
        display: flex;
        .body-item {
          width: 33%;
          height: 24px;
          line-height: 24px;
          text-align: center;
        }
      }
    }
  }
  .CertifiedAccountDetailClass {
    z-index: 2;
    position: absolute;
    top: 50px;
    right: -140px;
    width: 350px;
    height: 180px;
    background: url(../../assets/qjzl-new/xzxk/hlrl-pop-bg.png);
    background-size: 100% 100%;
    .capacity-box {
      width: 100%;
      height: 100%;
      padding: 10px;
      .head {
        display: flex;
        width: 100%;
        height: 30px;
        .head-item {
          width: 33%;
          height: 30px;
          text-align: center;
          font-weight: 600;
          line-height: 30px;
        }
      }
      .body {
        width: 100%;
        display: flex;
        .body-item {
          width: 33%;
          height: 24px;
          line-height: 24px;
          text-align: center;
        }
      }
    }
  }
  .saleTotalClass {
    z-index: 2;
    position: absolute;
    top: 30px;
    right: -80px;
    width: 260px;
    height: 120px;
    background: url(../../assets/qjzl-new/xzxk/hlrl-pop-bg.png);
    background-size: 100% 100%;
    .capacity-box {
      width: 100%;
      height: 100%;
      padding: 5px;
      .head {
        display: flex;
        width: 100%;
        height: 30px;
        .head-item {
          width: 33%;
          height: 30px;
          text-align: center;
          font-weight: 600;
          line-height: 30px;
        }
      }
      .body {
        width: 100%;
        display: flex;
        .body-item {
          width: 50%;
          height: 24px;
          line-height: 24px;
          text-align: center;
        }
      }
    }
  }
}
.fs-28 {
  font-size: 28px;
}
</style>
